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
single shared ticker #37109
Comments
Per discussion on python-dev, here's a patch that gets rid of the |
Logged In: YES Here's an updated patch. It creates two internal globals, _Py_Ticker and |
Logged In: YES minor correction to the patch - initialize both _Py_CheckInterval and |
Logged In: YES I'd be more interested in a patch that also implemented |
Logged In: YES Here's a new version that includes Jeremy's shortcut. With with my initial patch & Jeremy's ticker shortcut: Pystone(1.1) time for 50000 passes = 7.67 back to just my initial patch without the shortcut: Pystone(1.1) time for 50000 passes = 7.59 I'm perplexed by the performance difference. Again, I think these
in my build directory. I'm using gcc 2.96 and glibc 2.2.4. |
Logged In: YES Note that the ticker has to be declared volatile. Also """ You can't predict whether ceval will slow down or speed up, |
Logged In: YES bump initial check interval to 100, per request from Tim & Guido. |
Logged In: YES This version declares the ticker volatile. Obvious performance hit. Does it |
Logged In: YES A performance hit compared to what? There are half a _Py_CheckInterval needn't be delcared volatile, BTW; i.e., + PyAPI_DATA(volatile int) _Py_CheckInterval; I can't time this today, but you should be just as keen to |
Logged In: YES Sorry, compared to the previous version (_Py_CheckInterval == 10, Let me know what, if anything, you'd like me to report performance-wise. Skip |
Logged In: YES I just went back and re-ran everything. Here are the results. methodology:
------------------------------------------------------------------------------ Pystone(1.1) time for 50000 passes = 7.68 ------------------------------------------------------------------------------ Pystone(1.1) time for 50000 passes = 7.64 ------------------------------------------------------------------------------ Pystone(1.1) time for 50000 passes = 7.67 ------------------------------------------------------------------------------ Pystone(1.1) time for 50000 passes = 7.67 ------------------------------------------------------------------------------ Pystone(1.1) time for 50000 passes = 7.67 |
Logged In: YES FWIW, I measure a similar slowdown with the latest patch, But I still think it's good to check this in now, Skip. Then |
Logged In: YES I get a 1.5% speedup on Win2K, baseline versus whatever Skip, as I said before, """ + PyAPI_DATA(volatile int) _Py_CheckInterval; The patch won't compile under MSVC6 unless this is done |
Logged In: YES Implemented as |
Logged In: YES oops, and Python/pystate.c 2.21 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: