cvs commit: src/lib/libc/amd64/stdlib Makefile.inc div.S ldiv.S lldiv.S

Jung-uk Kim jkim at FreeBSD.org
Wed Apr 4 01:31:22 UTC 2007


On Tuesday 03 April 2007 09:19 pm, Jung-uk Kim wrote:
> jkim        2007-04-04 01:19:54 UTC
>
>   FreeBSD src repository
>
>   Added files:
>     lib/libc/amd64/stdlib Makefile.inc div.S ldiv.S lldiv.S
>   Log:
>   Import amd64 assembly implementations of div(3) family from
> NetBSD.
>
>   Obtained from:  NetBSD
>
>   Revision  Changes    Path
>   1.1       +4 -0      src/lib/libc/amd64/stdlib/Makefile.inc (new)
>   1.1       +17 -0     src/lib/libc/amd64/stdlib/div.S (new)
>   1.1       +15 -0     src/lib/libc/amd64/stdlib/ldiv.S (new)
>   1.1       +15 -0     src/lib/libc/amd64/stdlib/lldiv.S (new)

Here is some stats:

x div.c
+ div.S
+--------------------------------------------------------------------------+
|            +                                                       x     |
|            +                                                       x     |
|            +                                                       x     |
|            +                                                       x     |
|            +                                                       x     |
|            +                                                       x     |
|       ++   +                                                      xx     |
|       ++  ++                                                   x  xx     |
|       ++ +++                                                   x  xx     |
|+     +++ +++                 x                            x    xxxxx     |
|       |__AM_|                                            |______A__M____||
+--------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  25       0.80913      0.842137      0.841493    0.83946676  0.0065767776
+  25      0.782989      0.793462      0.792594    0.79126932  0.0025271281
Difference at 95.0% confidence
        -0.0481974 +/- 0.00283374
        -5.74144% +/- 0.337564%
        (Student's t, pooled s = 0.00498199)

x ldiv.c
+ ldiv.S
+--------------------------------------------------------------------------+
|            +                                                             |
|            +                                                             |
|      +     +                                                  x          |
|      +     +                                                  x     xx   |
|      +     +                                                  x     xx   |
|      +    ++                                                 xx     xx   |
|      +   +++                                                 xx     xx   |
|+    ++++++++      +    x                                 x xxxx  x xxx   |
|      |__AM__|                                         |_______MA________||
+--------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  25      1.262527      1.293172      1.288804     1.2891065  0.0060759831
+  25       1.24652      1.259101       1.25342     1.2527828  0.0025334642
Difference at 95.0% confidence
        -0.0363236 +/- 0.00264769
        -2.81774% +/- 0.205389%
        (Student's t, pooled s = 0.00465489)

Each run is total user time of 25M executions in a tight
loop on Athlon64 @2GHz.

FYI,

Jung-uk Kim


More information about the cvs-all mailing list