pyodide/micropip

Optimize the speed of parsing and comparing Versions

ryanking13 opened this issue · 0 comments

We parse and compare versions lots of times when searching for an appropriate package, but parsing and comparing Version (packaging.version.Version) is quite expensive.

See: #71 (comment)

So it would be nice to do some micro-optimizations for handling versions, such as (#71 (comment)):

If we want to go faster (no need to do it, just an idea). We can probably also subclass Version to something that has a frozen str and hash so it doesn't need to be re-computed at each dict comparison.