faster access to Context and ContextPath - #78
Conversation
|
If we could get a benchmark on this, I'd appreciate it. On my list of things to do is benchmark all of the changes since 4.0.0 to get a sense of what improvements there have been. |
Working on it... |
|
Here are the benchmarks. From running
Code: And these are some results from mathics-benchmarks: |
|
Again, I found funny some of the results in mathics-benchmarks: |
Overall, excellent work! I will investigate the slowdowns to see if I can understand what is going on. |
I am not seeing this, but instead the "faster_context" branch is faster, but not by much. Here is what I did. I Then I went into ipython in each and rean the setup code listed above Here is what I see. First Next |
|
I was able to see the speedups reported in lookup up single simples (in a loop of 1000 times, so this is kind of expected). The greatest mathics-benchmark difference I am not seeing though. Something is weird with mathics benchmark I think. |
|
In resolving the CHANGES conflicts, I made some of the simpler typographical changes. However deeper changes should be made in a separate PR. |
|
LGTM |




This PR is a small part of #64 that helps to access the current context and the context without the need to look at the corresponding definition. These variables are intensively used each time that the context of a symbol needs to be resolved.