On Thu, Oct 2, 2008 at 5:41 PM, Schuh, Richard <[EMAIL PROTECTED]> wrote:
> You could make that perhaps a little better:
> "...| sort 57.19 d | take 1 |..."
Or ".. | substr 57.19 | sort d | take | .. " to reduce the working
storage for the sort stage (but only for very large data sets).
With the latest pipes, we can even make it much better*
spec printonly eof
a: 57.19 -
if first() then set #0:=a
elseif a>>#0 then set #0:=a
fi
eof
print #0 1
* But "better" is so subjective. The spec 407 compare eliminates the
need for sorting and buffering the list, but just scans them and
retains the largest entry. As I expected it uses ~ 100 K less memory,
and as I should have predicted it uses a lot more CPU...
-Rob