Hi,

I re-ran this with train data overnight, and updated the spreadsheet.
Performance seems to increase or stay constant for all the benchmarks. For
some benchmarks, "perf stat" shows an increase in branch mispredictions,
though... I'm unsure why.

I'll send the patch to llvm-commits. Do you think the branch weights are OK
like this (I've set them to 1:100000)? It might be possible to measure how
often a slow path is taken, and come up with a more precise number, but I'm
not sure it would make a difference for the optimizer.

Cheers,
Jonas


On Thu, Aug 28, 2014 at 7:08 PM, Konstantin Serebryany <
[email protected]> wrote:

> I can confirm that the performance on spec (test data) looks great.
> These are the number on my machine (the smaller the better).
>                              no weights    with weights   diff
>        400.perlbench,        10.40,        10.30,         0.99
>            401.bzip2,        11.70,        10.70,         0.91
>              403.gcc,         2.52,         2.77,         1.10
>              429.mcf,         4.15,         3.60,         0.87
>            445.gobmk,        38.20,        36.10,         0.95
>            456.hmmer,         7.24,         6.44,         0.89
>            458.sjeng,         7.90,         7.23,         0.92
>       462.libquantum,         0.08,         0.09,         1.03
>          464.h264ref,        35.10,        27.80,         0.79
>          471.omnetpp,         1.44,         1.34,         0.93
>            473.astar,        14.80,        13.60,         0.92
>        483.xalancbmk,         0.46,         0.43,         0.94
>             433.milc,        11.50,        11.00,         0.96
>             444.namd,        17.90,        16.90,         0.94
>           447.dealII,        27.60,        28.40,         1.03
>           450.soplex,         0.11,         0.11,         1.02
>           453.povray,         1.53,         1.50,         0.98
>              470.lbm,         3.68,         3.51,         0.95
>          482.sphinx3,         2.46,         2.34,         0.95
> I will re-run with ref data overnight.
> Please send the patch to llvm-commits (
> https://code.google.com/p/address-sanitizer/wiki/HowToContribute)
> and I will apply it (or you can do it if you have commit access)
>
> Thanks for reminding us about this low hanging fruit!
>
> --kcc
>
>
> On Thu, Aug 28, 2014 at 5:31 AM, Jonas Wagner <[email protected]>
> wrote:
>
>> Hi,
>>
>>
>> The change to add weights is trivial.
>>> I am not against it and the patch is welcome, but it will need to be
>>> accompanied with SPEC performance numbers.
>>
>>
>> I modified ASan and did a quick run on SPEC. Results are available in
>> this spreadsheet [1]. Detailed output from "perf stat", including standard
>> deviations from three runs, is available at [2].
>>
>> Overall, it seems that branch weights reduce the runtime of SPEC
>> benchmarks by about 3% on average, and reduce branch misses by about 8%.
>> Results vary quite strongly between benchmarks, but branch weights seem to
>> be beneficial for 14 out of 16.
>>
>> This uses just the SPEC "test" workload, so the results might not be very
>> precise. I'll re-run with longer workloads to confirm.
>>
>> A patch is attached.
>>
>> Cheers,
>> Jonas
>>
>>
>> [1]:
>> https://docs.google.com/spreadsheets/d/1t5sMnBMXWr5BXM8jZiW_G2XSTtVczaOrPyPAEMXL9qc/
>> [2]:
>> https://drive.google.com/open?id=0B8pYrLJnKwDSa3lQaXdudGdrNFU&authuser=0
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "address-sanitizer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "address-sanitizer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to