in reply to Re: Re: Processing data with lot of math...
in thread Processing data with lot of math...
That's good. Unfortunately, anything involving recursion in perl tends to hit performance quite badly once the volumes of data rise.
If the mapping to integer coords is working okay, then you could (potentially) save a bit more time on large volumes of data by concatenating the pack'd integers rather than the ascii representations.
$hash{ join'', pack 'N3', $x, $y, $z } = 'name x.xx y.yy z.zz';
This would allow you to do an alpha sort rather than a numeric one, and avoids the need to add leading zeros to the values. It might also conserve a little space, though you are unlikely to see this unless your resultant concatenated ascii values are greater than 12 characters.
You'd need to benchmark some typical datasets to see what if any benefit this would have, and where an transitions occured.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Processing data with lot of math...
by itub (Priest) on May 12, 2004 at 19:40 UTC | |
by BrowserUk (Patriarch) on May 12, 2004 at 20:43 UTC |