Thanks Nilay _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
I was looking at the implementation of floorLog2() in src/base/intmath.hh.
I think this implementation is not the best that can be done. We should
use a GCC builtin __builtin_clz* to implement these functions. I have not
carried out any test to get the execution times for two different
implementations. But I looked at the assembly code generated for the two
implementations for 64-bit version of the function. The ratio of number of
instructions is probably about 1:4 for builtin versus current
implementation.
- [m5-dev] floorLog2() Nilay Vaish
- Re: [m5-dev] floorLog2() nathan binkert
- Re: [m5-dev] floorLog2() Nilay Vaish
- Re: [m5-dev] floorLog2() nathan binkert
