4 ms·
assuming it's legal to do so, GIL release seems like a reasonable flag to add to possibly-expensive functions like re.() ... or even better, have re. track its
by asah 4y ago
assuming it's legal to do so, GIL release seems like a reasonable flag to add to possibly-expensive functions like re.()
... or even better, have re. track its own performance and release the GIL if it forecasts that it statistically-might use a lot more computation... a trivial strawman algorithm: if len(input) > MAX then release GIL first.