[Tremor] excessive use of 'long' vars
Oliver Lange
bloody at bloody.in-berlin.de
Thu May 11 01:36:15 PDT 2006
Hi fellas, :)
I'd just like to say that Tremor us using an unnecessary
amount of 'long' vars where 'int' would be the better
choice. The point is that 'long' is 64-bit on 64-bit
systems, where e.g. the following tables would just
produce the double data size, just to mention two:
lsp_lookup.h:
INVSQ_LOOKUP_I[64+1]
INVSQ_LOOKUP_IDel[64]
And other places in the code where the use of long's is
unnecessary, like using 'long i' as counter variable for
the number of comments in a file in vorbis_comment_query().
I guess that noone would expect to find billions of
comments in a file?
Using long means computing in 64-bit which might be slower
than computing 32-bit on some CPUs or in some cases.
Of course this would have no real influence on computing
comment stuff, but Tremor is full of longs everywhere,
like the use of bitrate values. A GHz bitrate appears pretty
unlikely to me, even in the very distant future. :)
First i began to fix these longs for myself but i quickly
gave up because there are so many.
This is just a matter of 'perfect code', as i didn't compile
the whole thing on my AMD64 just to see if there are issues
caused by the frivolous use of longs. If someday the Tremor
source is going to be closed as 'finished' piece of software,
this is a minor issue that should be fixed as well.
No offense.. :)
--
Cheers,
Oliver 'Bloody' Lange.
More information about the Tremor
mailing list