Hacker News new | ask | show | jobs
by BiteCode_dev 1515 days ago
Anthony Sottile has a good bit on it: https://www.youtube.com/watch?v=tFrh9hKMS6Y

TL;DR: Path() initialization is very heavy compared to simple strings, and subsequent path operations produce new Path() objects every time.

The video then illustrates the point with a patch to the black formatter cache yielding a 40X speedup.

1 comments

Oh, that is unfortunate. Thanks for the tip.