Report on Python AST Optimizer

I tried the Python compile-time AST Optimizer:

https://bitbucket.org/haypo/astoptimizer

on my Python Equations II library:

http://code.google.com/p/pyeq2/downloads/list

using the "run all unit tests" script, which gives the library a fairly thorough and substantial combing over. I had been running the Python profiler on the library repeatedly for years, trying my best to improve performance by reworking any poorly performing code. While a recursive diff of before-and-after directories showed that the optimizer had been applied, I did not see any reduction in my test machine's 338 second total runtime.

The AST Optimizer is worth trying if you suspect your Python code is not at peak performance level.

James

2 Replies

So… your recommendation for AST Optimizer is that it didn't make any improvements for you whatsoever? I'm confused.

@Guspaz:

I'm confused.

I understand your "confusion".

James

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct