[RFC] Make Iconv aware of hwcaps
Andreas Krebbel
krebbel@linux.vnet.ibm.com
Wed Feb 4 16:41:00 GMT 2009
Hello Ulrich,
> You don't honestly expect that I'll add a patch which slows down every
> architecture for the sake of s390, do you?
I don't consider this a s390 only feature. Other architectures might
benefit from it as well. x86 has SSE instructions which can also be used
to accelerate character conversions and depend on the availability of a
hw feature which is represented in the hwcaps vector.
But I understand that a platform not using this feature should not see
any performance regressions with this.
Currently I see two solutions (plus the runtime check in the iconv
module you proposed):
1. The extra effort for the module lookup could be enabled/disabled
using a configure flag.
That way only architectures actually providing such modules could enable it.
2. The gconv_module file format could be extended to mark certain
modules as being possibly hw specific, so that the additional effort
will only be spent for these conversions. That way the hw specific
modules could be installed into a separate directory with its own
gconv_module. The separate gconv_module file could then make use of the
hwcaps markers to enable the extended lookup.
> You'll have to make this a runtime test. Create modules specifically
> for s390 which test for the flag and then use the hardware support. All
> completely hidden in s390-specific directories etc.
Don't you think that a more general solution would be preferrable?! I
really think that this is interesting for other platforms as well.
I also see it as a disadvantage that one always has to provide a
software implementation as fallback instead of leaving it to the iconv
graph search to find a different way to perform the conversion.
-Andreas-
More information about the Libc-alpha
mailing list