[Patch] Start using the front-end traits in the library

Paolo Carlini pcarlini@suse.de
Tue Apr 3 19:14:00 GMT 2007


Benjamin Kosnik wrote:

> This is so cool: great work.

Thanks Benjamin. Indeed, I agree that many details become neater 
(besides the obvious performance improvements for POD, non-scalar types)

> At first, I thought we could use these to get rid of __is_scalar in 
> bits/cpp_type_traits.h. But, probably not. Oh well.

I don't know, at the moment. As far as I can see the only remaining use 
is in stl_algobase.h, where Nathan had the idea that moving a __tmp 
outside the loop is certainly profitable when the type is sufficiently 
small, in the sense that it fits in a register. I think __is_scalar is 
rather suited for this task. On the other hand, one can well imagine the 
optimizers to do the reasoning, automatically: some time ago I quickly 
asked compiler people and the idea appeared to make sense, only waiting 
for a volunteer to implement it ;) I'll try to further investigate...

Paolo.



More information about the Libstdc++ mailing list