Bug 23964 - Use __uint128_t if available (gcc)
Summary: Use __uint128_t if available (gcc)
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.9.3
Hardware: Other All
: medium trivial
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-15 08:52 UTC by Sebastian Dröge (slomo)
Modified: 2009-09-15 10:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
0001-Use-__uint128_t-and-__int128_t-if-available.patch (4.39 KB, patch)
2009-09-15 08:52 UTC, Sebastian Dröge (slomo)
Details | Splinter Review

Description Sebastian Dröge (slomo) 2009-09-15 08:52:46 UTC
Created attachment 29568 [details] [review]
0001-Use-__uint128_t-and-__int128_t-if-available.patch

Hi,
the attached patch changes configure to also check for __uint128_t, which is the new name of uint128_t from gcc. It is only available on architectures that provide instructions for 128 bit integers.

(I had to move some code in cairo-wideint.c because apparently nobody compiled with a gcc that has uint128_t since a very long time and macros/functions were not defined)
Comment 1 Sebastian Dröge (slomo) 2009-09-15 10:13:08 UTC
Ok, this doesn't make anything much faster.

without __uint128_t:
[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]     xlib         firefox-planet-gnome   89.557   89.572   0.29%    3/3
[  1]     xlib            firefox-talos-gfx  105.301  106.202   0.91%    3/3
[  2]     xlib            firefox-talos-svg   85.503   85.971   0.85%    3/3

with __uint128_t:
[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]     xlib         firefox-planet-gnome   89.414   89.497   0.32%    3/3
[  1]     xlib            firefox-talos-gfx  104.758  105.281   0.60%    3/3
[  2]     xlib            firefox-talos-svg   85.359   86.239   0.74%    3/3
Comment 2 Chris Wilson 2009-09-15 10:22:04 UTC
Actually it does have a significant impact on other workloads:

commit 56c9b2de7a2b93b2e0c59cf98326d8c0d4d508ba
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Tue Sep 15 17:26:59 2009 +0200

    Use __uint128_t and __int128_t if available
    
    GCC uses a peculiar name for a real 128-bit integer on x86-64.
    
    Speedups, xlib on a gm45
    ========================
    poppler        41246.56 -> 35102.82: 1.18x speedup
    swfdec-youtube 12623.01 -> 11936.79: 1.06x speedup
    
Pushed, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.