Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-13 Thread Marco Sulla
Well, I suppose we have a winner:

pyperf_bench_3_8_gcc_9_2.json
=

Performance version: 1.0.0
Report on Linux-4.15.0-76-generic-x86_64-with-glibc2.27
Number of logical CPUs: 4
Start date: 2020-03-13 19:36:17.585796
End date: 2020-03-13 20:35:09.605718

pyperf_bench_3_8_clang_9.json
=

Performance version: 1.0.0
Report on Linux-4.15.0-76-generic-x86_64-with-glibc2.27
Number of logical CPUs: 4
Start date: 2020-03-13 20:55:54.239018
End date: 2020-03-13 21:59:19.778522

+-+---+---+--+-+
| Benchmark   | pyperf_bench_3_8_gcc_9_2.json |
pyperf_bench_3_8_clang_9.json | Change   | Significance|
+=+===+===+==+=+
| 2to3| 477 ms| 527 ms
   | 1.11x slower | Significant (t=-210.10) |
+-+---+---+--+-+
| chameleon   | 13.2 ms   | 15.9 ms
  | 1.20x slower | Significant (t=-123.35) |
+-+---+---+--+-+
| chaos   | 155 ms| 193 ms
   | 1.25x slower | Significant (t=-176.57) |
+-+---+---+--+-+
| crypto_pyaes| 158 ms| 195 ms
   | 1.24x slower | Significant (t=-81.20)  |
+-+---+---+--+-+
| deltablue   | 10.2 ms   | 12.1 ms
  | 1.19x slower | Significant (t=-50.11)  |
+-+---+---+--+-+
| django_template | 69.4 ms   | 80.9 ms
  | 1.17x slower | Significant (t=-77.25)  |
+-+---+---+--+-+
| dulwich_log | 106 ms| 113 ms
   | 1.06x slower | Significant (t=-62.12)  |
+-+---+---+--+-+
| fannkuch| 659 ms| 789 ms
   | 1.20x slower | Significant (t=-62.44)  |
+-+---+---+--+-+
| float   | 165 ms| 198 ms
   | 1.20x slower | Significant (t=-124.75) |
+-+---+---+--+-+
| genshi_text | 40.5 ms   | 46.6 ms
  | 1.15x slower | Significant (t=-111.00) |
+-+---+---+--+-+
| genshi_xml  | 87.3 ms   | 97.2 ms
  | 1.11x slower | Significant (t=-66.48)  |
+-+---+---+--+-+
| go  | 361 ms| 434 ms
   | 1.20x slower | Significant (t=-136.23) |
+-+---+---+--+-+
| hexiom  | 14.0 ms   | 16.4 ms
  | 1.17x slower | Significant (t=-103.53) |
+-+---+---+--+-+
| html5lib| 143 ms| 157 ms
   | 1.10x slower | Significant (t=-14.52)  |
+-+---+---+--+-+
| json_dumps  | 18.2 ms   | 20.8 ms
  | 1.14x slower | Significant (t=-82.67)  |
+-+---+---+--+-+
| json_loads  | 42.9 us   | 46.0 us
  | 1.07x slower | Significant (t=-42.16)  |

Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-02 Thread Skip Montanaro via Python-list
>
> Have you compiled it optimized (--enable-optimizations --with-lto)?
>

Nope, just ./configure. Further investigation is left as an exercise for
the reader. :-)

Skip

>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-02 Thread Marco Sulla via Python-list
Oooohhh uff, I have to install latest clang... or better, compile
it as I did for gcc. And I have to read the install docs to see if
there's some trick to optimize it... and I have to read the docs of
pyperformance too (I only used pyperf until now)...

Oh well, tomorrow :-D

On Mon, 2 Mar 2020 at 00:58, Skip Montanaro  wrote:
>>
>> Have you compiled it optimized (--enable-optimizations --with-lto)?
>
>
> Nope, just ./configure. Further investigation is left as an exercise for the 
> reader. :-)
>
> Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-01 Thread Skip Montanaro via Python-list
I didn't have clang installed. It was just "sudo apt install clang-8". From
there all I had to do was build Python from scratch twice, install
pyperformance using pip after the first build, then run it after each
build. It's not difficult. Going beyond that right now is not an itch I
need to scratch though. I have other things on my plate.

Skip

On Sun, Mar 1, 2020, 6:11 PM Marco Sulla <
mail.python@marco.sulla.e4ward.com> wrote:

> Oooohhh uff, I have to install latest clang... or better, compile
> it as I did for gcc. And I have to read the install docs to see if
> there's some trick to optimize it... and I have to read the docs of
> pyperformance too (I only used pyperf until now)...
>
> Oh well, tomorrow :-D
>
> On Mon, 2 Mar 2020 at 00:58, Skip Montanaro 
> wrote:
> >>
> >> Have you compiled it optimized (--enable-optimizations --with-lto)?
> >
> >
> > Nope, just ./configure. Further investigation is left as an exercise for
> the reader. :-)
> >
> > Skip
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-01 Thread Marco Sulla via Python-list
Good! Have you compiled it optimized (--enable-optimizations --with-lto)?

On Sun, 1 Mar 2020 at 23:48, Skip Montanaro  wrote:
>
> > As title. Currently I'm using gcc 9.2.0 and its compilation seems to
> > work well and fast. But I would know by your experience if clang can
> > produce, on a *nix system, a "faster Python".
>
> I took a quick run at this as I was wanting to give pyperformance a try. 
> Comparing GCC 9 with CLANG 8 on my Ubuntu laptop here's what I got. It seems 
> that GCC was a bit faster than CLANG pretty much across the board.
>
> +-+-+---+
> | Benchmark   | gcc | clang |
> +=+=+===+
> | 2to3| 403 ms  | 440 ms: 1.09x slower (+9%)|
> +-+-+---+
> | chameleon   | 12.6 ms | 13.5 ms: 1.07x slower (+7%)   |
> +-+-+---+
> | chaos   | 148 ms  | 169 ms: 1.14x slower (+14%)   |
> +-+-+---+
> | crypto_pyaes| 145 ms  | 157 ms: 1.08x slower (+8%)|
> +-+-+---+
> | deltablue   | 9.79 ms | 11.4 ms: 1.17x slower (+17%)  |
> +-+-+---+
> | django_template | 69.9 ms | 77.6 ms: 1.11x slower (+11%)  |
> +-+-+---+
> | dulwich_log | 89.3 ms | 92.6 ms: 1.04x slower (+4%)   |
> +-+-+---+
> | fannkuch| 590 ms  | 602 ms: 1.02x slower (+2%)|
> +-+-+---+
> | float   | 150 ms  | 160 ms: 1.07x slower (+7%)|
> +-+-+---+
> | genshi_text | 35.9 ms | 39.4 ms: 1.10x slower (+10%)  |
> +-+-+---+
> | genshi_xml  | 74.8 ms | 81.8 ms: 1.09x slower (+9%)   |
> +-+-+---+
> | go  | 339 ms  | 390 ms: 1.15x slower (+15%)   |
> +-+-+---+
> | hexiom  | 12.9 ms | 14.3 ms: 1.11x slower (+11%)  |
> +-+-+---+
> | json_dumps  | 16.4 ms | 17.6 ms: 1.07x slower (+7%)   |
> +-+-+---+
> | json_loads  | 32.9 us | 34.6 us: 1.05x slower (+5%)   |
> +-+-+---+
> | logging_format  | 13.9 us | 15.2 us: 1.09x slower (+9%)   |
> +-+-+---+
> | logging_silent  | 253 ns  | 298 ns: 1.18x slower (+18%)   |
> +-+-+---+
> | logging_simple  | 12.6 us | 14.1 us: 1.12x slower (+12%)  |
> +-+-+---+
> | mako| 21.8 ms | 24.2 ms: 1.11x slower (+11%)  |
> +-+-+---+
> | meteor_contest  | 128 ms  | 133 ms: 1.04x slower (+4%)|
> +-+-+---+
> | nbody   | 181 ms  | 190 ms: 1.05x slower (+5%)|
> +-+-+---+
> | nqueens | 128 ms  | 135 ms: 1.05x slower (+5%)|
> +-+-+---+
> | pathlib | 26.3 ms | 27.1 ms: 1.03x slower (+3%)   |
> +-+-+---+
> | pickle  | 13.3 us | 13.5 us: 1.01x slower (+1%)   |
> +-+-+---+
> | pickle_dict | 33.8 us | 33.6 us: 1.01x faster (-1%)   |
> +-+-+---+
> | pickle_list | 4.82 us | 5.18 us: 1.07x slower (+7%)   |
> +-+-+---+
> | pickle_pure_python  | 613 us  | 725 us: 1.18x slower (+18%)   |
> +-+-+---+
> | pidigits| 210 ms  | 218 ms: 1.04x slower (+4%)|
> +-+-+---+
> | pyflate | 871 ms  | 1.00 sec: 1.15x slower (+15%) |
> +-+-+---+
> | python_startup  | 10.3 ms | 10.4 ms: 

Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-01 Thread Skip Montanaro
> As title. Currently I'm using gcc 9.2.0 and its compilation seems to
> work well and fast. But I would know by your experience if clang can
> produce, on a *nix system, a "faster Python".

I took a quick run at this as I was wanting to give pyperformance
 a try. Comparing GCC 9 with CLANG 8 on
my Ubuntu laptop here's what I got. It seems that GCC was a bit faster than
CLANG pretty much across the board.

+-+-+---+
| Benchmark   | gcc | clang |
+=+=+===+
| 2to3| 403 ms  | 440 ms: 1.09x slower (+9%)|
+-+-+---+
| chameleon   | 12.6 ms | 13.5 ms: 1.07x slower (+7%)   |
+-+-+---+
| chaos   | 148 ms  | 169 ms: 1.14x slower (+14%)   |
+-+-+---+
| crypto_pyaes| 145 ms  | 157 ms: 1.08x slower (+8%)|
+-+-+---+
| deltablue   | 9.79 ms | 11.4 ms: 1.17x slower (+17%)  |
+-+-+---+
| django_template | 69.9 ms | 77.6 ms: 1.11x slower (+11%)  |
+-+-+---+
| dulwich_log | 89.3 ms | 92.6 ms: 1.04x slower (+4%)   |
+-+-+---+
| fannkuch| 590 ms  | 602 ms: 1.02x slower (+2%)|
+-+-+---+
| float   | 150 ms  | 160 ms: 1.07x slower (+7%)|
+-+-+---+
| genshi_text | 35.9 ms | 39.4 ms: 1.10x slower (+10%)  |
+-+-+---+
| genshi_xml  | 74.8 ms | 81.8 ms: 1.09x slower (+9%)   |
+-+-+---+
| go  | 339 ms  | 390 ms: 1.15x slower (+15%)   |
+-+-+---+
| hexiom  | 12.9 ms | 14.3 ms: 1.11x slower (+11%)  |
+-+-+---+
| json_dumps  | 16.4 ms | 17.6 ms: 1.07x slower (+7%)   |
+-+-+---+
| json_loads  | 32.9 us | 34.6 us: 1.05x slower (+5%)   |
+-+-+---+
| logging_format  | 13.9 us | 15.2 us: 1.09x slower (+9%)   |
+-+-+---+
| logging_silent  | 253 ns  | 298 ns: 1.18x slower (+18%)   |
+-+-+---+
| logging_simple  | 12.6 us | 14.1 us: 1.12x slower (+12%)  |
+-+-+---+
| mako| 21.8 ms | 24.2 ms: 1.11x slower (+11%)  |
+-+-+---+
| meteor_contest  | 128 ms  | 133 ms: 1.04x slower (+4%)|
+-+-+---+
| nbody   | 181 ms  | 190 ms: 1.05x slower (+5%)|
+-+-+---+
| nqueens | 128 ms  | 135 ms: 1.05x slower (+5%)|
+-+-+---+
| pathlib | 26.3 ms | 27.1 ms: 1.03x slower (+3%)   |
+-+-+---+
| pickle  | 13.3 us | 13.5 us: 1.01x slower (+1%)   |
+-+-+---+
| pickle_dict | 33.8 us | 33.6 us: 1.01x faster (-1%)   |
+-+-+---+
| pickle_list | 4.82 us | 5.18 us: 1.07x slower (+7%)   |
+-+-+---+
| pickle_pure_python  | 613 us  | 725 us: 1.18x slower (+18%)   |
+-+-+---+
| pidigits| 210 ms  | 218 ms: 1.04x slower (+4%)|
+-+-+---+
| pyflate | 871 ms  | 1.00 sec: 1.15x slower (+15%) |
+-+-+---+
| python_startup  | 10.3 ms | 10.4 ms: 1.01x slower (+1%)   |
+-+-+---+
| python_startup_no_site  | 7.16 ms | 7.39 ms: 1.03x slower (+3%)   |
+-+-+---+

Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-01 Thread Marco Sulla via Python-list
As title. Currently I'm using gcc 9.2.0 and its compilation seems to
work well and fast. But I would know by your experience if clang can
produce, on a *nix system, a "faster Python".
-- 
https://mail.python.org/mailman/listinfo/python-list