[Bf-committers] Re: [Bf-blender-cvs] CVS commit:
blender/source/blender/python/api2_2x Mesh.h Mesh.c
branan at gmail.com
Fri Sep 22 19:19:31 CEST 2006
Even if it does pad it - which it probably does - the math is still
being done on 8 bits, which is slower... just use ints.
On 9/22/06, Martin Poirier <theeth at yahoo.com> wrote:
> --- Branan Riley <branan at gmail.com> wrote:
> > yeah, it would. But it'll actualy run slower, at
> > least on an x86 chip.
> > A modern Pentium (or Core) is optimized for 32-bit
> > numbers, then
> > 16-bit, then 8-bit. An 8-bit number which exists
> > solely in a function
> > will likely be added to the stack - which isn't
> > aligned. This will
> > slow down all stack operations (which includes
> > variable access, and
> > function calls - ouch). Not only that, arithmetic
> > operations are
> > slower on 8-bit numbers. Just go with an int. The
> > savings in memory
> > aren't worth the slowdown.
> Compilers usually make sure alignement is maintained
> when possible and when it would make sense to do so on
> the target architecture. Hence why I asked if it did
> really reduce memory usage (the compiler might have
> padded the struct).
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> Bf-committers mailing list
> Bf-committers at projects.blender.org
More information about the Bf-committers