The Guttman-Rosler Transform is a technique from Uri Guttman and Larry Rosler for improving sort speed in perl.……【阅读全文】
12月
09
The Guttman-Rosler Transform is a technique from Uri Guttman and Larry Rosler for improving sort speed in perl.……【阅读全文】
The Orcish Maneuver (invented by Joseph N. Hall [8]) eliminates the preprocessing pass over the data, which might save keeping a copy of the data if they are being read directly from a file. It does the sortkey extraction only once per record, as it checks the hash to see if it was done before. The test and storage of the sortkey is done with the ||= operator (short-circuit or-assignment), which will evaluate and assign the expression on the right to the lvalue on the left, if the lvalue is false. The name “orcish” is a pun on “or-cache”. The full statement in the sortsub looks like this:……【阅读全文】
Get every new post delivered to your Inbox
Join other followers