Message 45824 - Python tracker (original) (raw)

Logged In: YES user_id=80475

It needs to be timed on very large patterns -- it will always do worse on very small patterns (due to the time to setup the dispatch table).

I'm not satisfied with the patch the way it stands. Ideally, the dispatch table needs to be pre-computed at compile time. The trick is how to view the enclosing variables (passing them as arguments is slow; using globals is not especially clean or fast). If that were resolved, then this approach would just about always be faster (a dictioary lookup and function call versus a long chain of elifs).

Any suggestions are welcome.