Question about signature computation performance

Daniel Stone daniel at fooishbar.org
Tue Oct 19 09:00:44 PDT 2010


On Thu, Oct 14, 2010 at 01:32:15PM -0400, Brett Ciphery wrote:
> I'm wondering if someone can comment on the performance loss for the
> below patch and whether it is significant enough to warrant a
> full signature computation/hashing algorithm rewrite.
> 
> The below was patched to libX11-1.1.3 to fix an issue with the
> keysym-tables ks_tables.h in a cross compile environment.  makekeys
> generates this file according to signatures it computes from keysymdef.h
> and it is used further in the building process. Though during runtime,
> the signature is again computed for lookup into the keysym-table.
> Problems can occur if there is a host-target mismatch (e.g.
> 32bit<->64bit) as for some strings, e.g. Greek_upsilonaccentdieresis, the
> signature which gets computed will overflow a 32bit register and the
> mapping will not be the same as decided during compile.
> 
> My proposed solution is below.  I'm wondering about performance loss by
> forcing an 'unsigned long long' onto a 32bit arch.

If you're looking for consistency across architectures, you'd be much
better using uint32_t instead of unsigned long long.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101020/af9eb5c1/attachment.pgp>


More information about the xorg-devel mailing list