develooper Front page | perl.perl5.porters | Postings from March 2017

Re: smoke-me/new_hashes: New Hash Functions and Tunable hashfunction support

Thread Previous
From:
demerphq
Date:
March 24, 2017 00:03
Subject:
Re: smoke-me/new_hashes: New Hash Functions and Tunable hashfunction support
Message ID:
CANgJU+WfReL9Efd+aOGGzttoHViu1yFB52eUyLZA=xLdLWRG-g@mail.gmail.com
On 24 March 2017 at 00:40, demerphq <demerphq@gmail.com> wrote:
> On 23 March 2017 at 12:24, demerphq <demerphq@gmail.com> wrote:
>> Today I have pushed  a branch smoke-me/new_hashes which adds some new
>> hashing options to perl.
>> I have done benchmarks using Porting/bench.pl, which unfortunately in
>> an over-hasty git clean -dfx I managed to wipe, so I need to recreate
>> them, but suffice it to say that on my system, even single byte keys
>> see a modest 1% performance improvment, and long strings can see up to
>> 50% improvement. I will post these benchmarks once I recreate them.
>
> Here you go. First as percentages compared to blead, then with raw counts.

And here is the summary of all the tests (not just hash tests), again
first percentages, then raw op-counts.

Key:
    Ir   Instruction read
    Dr   Data read
    Dw   Data write
    COND conditional branches
    IND  indirect branches
    _m   branch predict miss
    _m1  level 1 cache miss
    _mm  last cache (e.g. L3) miss
    -    indeterminate percentage (e.g. 1/0)

The numbers represent relative counts per loop iteration, compared to
blead at 100.0%.
Higher is better: for example, using half as many instructions gives 200%,
while using twice as many gives 50%.

AVERAGE

        blead stadtx_sb24 zaphod32_sb24 stadtx zaphod32
       ------ ----------- ------------- ------ --------
    Ir 100.00      106.39        106.60 102.89   103.04
    Dr 100.00       97.61         98.25 100.12   100.77
    Dw 100.00       98.39        100.23  98.44   100.49
  COND 100.00      100.41        100.35  99.64    99.42
   IND 100.00      100.00        100.56 100.00   102.88

COND_m 100.00       98.69        101.56 100.88    93.92
 IND_m 100.00      100.73        100.74 100.73   100.74

 Ir_m1 100.00      100.97         85.38  69.19    99.65
 Dr_m1 100.00      100.00        100.00 100.00   100.00
 Dw_m1 100.00       99.65         99.65 100.00   100.00

 Ir_mm 100.00      100.00        100.00 100.00   100.00
 Dr_mm 100.00      100.00        100.00 100.00   100.00
 Dw_mm 100.00      100.00        100.00 100.00   100.00

Key:
    Ir   Instruction read
    Dr   Data read
    Dw   Data write
    COND conditional branches
    IND  indirect branches
    _m   branch predict miss
    _m1  level 1 cache miss
    _mm  last cache (e.g. L3) miss
    -    indeterminate percentage (e.g. 1/0)

The numbers represent raw counts per loop iteration.

AVERAGE

          blead stadtx_sb24 zaphod32_sb24   stadtx zaphod32
       -------- ----------- ------------- -------- --------
    Ir   1409.1      1369.1        1377.9   1386.5   1394.7
    Dr    422.1       424.0         423.0    422.1    421.3
    Dw    201.9       202.6         201.6    202.7    201.8
  COND    214.5       213.8         214.2    214.4    214.5
   IND     19.2        19.2          19.2     19.2     19.1

COND_m      3.1         2.9           3.0      3.0      3.1
 IND_m     11.2        11.3          11.2     11.3     11.2

 Ir_m1      0.2         0.2           0.5      0.6      0.2
 Dr_m1     -0.0        -0.0           0.0     -0.0      0.0
 Dw_m1      0.0         0.0           0.0      0.0      0.0

 Ir_mm      0.0         0.0           0.0      0.0      0.0
 Dr_mm      0.0         0.0           0.0      0.0      0.0
 Dw_mm      0.0         0.0           0.0      0.0      0.0

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About