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.
|
|---|