in reply to How do I unpack Perl floats in C

I've found that a major hotspot is in a read loop where results are being read in and unpacked:

my @row = unpack("FFFFL", $tchandle->get($curdate));

I bet if you wrote that as:

my $packed = $tchandle->get($curdate); my @row = unpack("FFFFL", $packed );

and re-profiled, you'd find that it was the first line consuming the time, not the second.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy