2016-05-17 8:25 GMT+02:00 <zreed at fastmail.com>: > In the project https://github.com/zachariahreed/byteasm I mentioned on > the list earlier this month, I have a pass that to computes stack usage > for a given sequence of bytecodes. It seems to be a fair bit more > agressive than cpython. Maybe it's more generally useful. It's pure > python rather than C though. > IMO it's too big, resource hungry, and slower, even if you convert it in C. If you take a look at the current stackdepth_walk function which CPython uses, it's much smaller (not even 50 lines in simple C code) and quite efficient. Currently the problem is that it doesn't return the maximum depth of the tree, but it updates the intermediate/current maximum, and *then* it uses it for the subsequent calculations. So, the depth artificially grows, like in the reported cases. It doesn't require a complete rewrite, but spending some time for fine-tuning it. Regards Cesare -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160518/8e9b2b16/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4