Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use atomics as much for lasti #2472

Merged
merged 1 commit into from Feb 20, 2021
Merged

Conversation

coolreader18
Copy link
Member

Benchmark #1: ./rustpython-norm benchmarks/pystone.py
  Time (mean ± σ):      2.794 s ±  0.160 s    [User: 2.783 s, System: 0.006 s]
  Range (min … max):    2.597 s …  3.056 s    10 runs
 
Benchmark #2: ./rustpython-opt benchmarks/pystone.py
  Time (mean ± σ):      2.749 s ±  0.103 s    [User: 2.738 s, System: 0.005 s]
  Range (min … max):    2.577 s …  2.897 s    10 runs
 
Summary
  './rustpython-opt benchmarks/pystone.py' ran
    1.02 ± 0.07 times faster than './rustpython-norm benchmarks/pystone.py'

cc @pca006132

@coolreader18 coolreader18 force-pushed the coolreader18/optimize-lasti branch 2 times, most recently from fbb09ab to 7025f9c Compare February 16, 2021 05:22
@pca006132
Copy link
Contributor

Actually, I wonder if it would be possible to revise and see how can we make most of the code not multithreaded, and limit atomic/locks to places where they are absolutely needed. Making the structs impl Sync costs too much in terms of performance...

@coolreader18
Copy link
Member Author

I think we'd like to keep being GIL-less for now, which would involve Sync datatypes and mutexes - Larry Hasting's Gilectomy talk is a really good overview of the troubles with doing so, but as a clean-room implementation we have the opportunity to experiment with it and we already have it working. For pure performance, I don't think that's very good, which is the case with Gilectomy as well, but if you need performance I think turning off threading is a good solution for now.

@coolreader18 coolreader18 merged commit 9439212 into master Feb 20, 2021
@coolreader18 coolreader18 deleted the coolreader18/optimize-lasti branch April 1, 2021 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants