[issue42141] Speedup various dict inits

2020-11-12 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42141] Speedup various dict inits

2020-10-25 Thread Marco Sulla
Marco Sulla added the comment: Well, after a second thought I think you're right, there's no significant advantage and too much duplicated code. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue42141] Speedup various dict inits

2020-10-25 Thread Marco Sulla
Marco Sulla added the comment: The fact is that, IMHO, PGO will "false" the results, since it's quite improbable that in the test battery there's a test of creation of a dict from another dict with an hole. It seems to me that the comparison between the normal builds are more significant.

[issue42141] Speedup various dict inits

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: I run pyperformance=1.0.0 for your speedup_dictinit branch (7df3b9c) and master branch, with PGO+LTO build. ``` $ ./python -m pyperf compare_to master-opt.json dictinit.json -G --min-speed=1 Slower (22): - unpack_sequence: 62.7 ns +- 0.7 ns -> 70.3 ns +- 0.5

[issue42141] Speedup various dict inits

2020-10-25 Thread Marco Sulla
Marco Sulla added the comment: Note that this time I've no slowdown in the macro bench, since I used normal builds, not optimized ones. I suppose an optimized build will show slowdown because the new functions are not in the test battery. -- ___

[issue42141] Speedup various dict inits

2020-10-25 Thread Marco Sulla
Marco Sulla added the comment: I'm quite sure I not invented the wheel :) but I think it's a good improvement: | pathlib | 35.8 ms | 35.1 ms| 1.02x faster | Significant (t=13.21) | | scimark_monte_carlo | 176 ms | 172 ms | 1.02x

[issue42141] Speedup various dict inits

2020-10-24 Thread Inada Naoki
Inada Naoki added the comment: > 1. dicts from other dicts that are not "perfect" (combined and without holes) > 3. copies of dicts with many holes Note that I have optimized and rejected it by myself already. See https://github.com/python/cpython/pull/21669 and

[issue42141] Speedup various dict inits

2020-10-24 Thread Marco Sulla
New submission from Marco Sulla : The PR #22948 is an augmented version of #22346. It speeds up also the creation of: 1. dicts from other dicts that are not "perfect" (combined and without holes) 2. fromkeys 3. copies of dicts with many holes 4. dict from keywords, as in #22346 A sample