by pansa2 · 6y ago · 0 comments
I believe this comes from the fact that local-variable lookup is faster than global-variable lookup - because the former is lookup-by-index and the latter is lookup-by-name.
The same is true in Julia: “Any code that is performance critical or being benchmarked should be inside a function.” [0]
[0] https://docs.julialang.org/en/v1/manual/performance-tips/ind...
>> Would it be OK if we add this to 3.7beta2?
> It's up to the release manager, but personally it feels like you're pushing too hard. Since you've done that frequently in the past I think we should help you by declining your request. 3.8 is right around the corner (on a Python release timescale) and this will give people a nice incentive to upgrade. Subsequent betas exist to stabilize the release, not to put in more new stuff.
>PS. I like you a lot but there's no way I'm going to "bare" with you. :-)
if __name__ = "__main__":
mainMethod()Of course I could just use a real debugger...