This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Make Iconv aware of hwcaps


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-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]