fastcounter
fastcounter copied to clipboard
Idea: Get count value from string representation
At least in the version of Python I'm using (2.7.15), calling the builtin str function on an itertools.count object will return a string that looks like "count(0)". Parsing it out would be as simple as int(str(count)[6:-1]).
Is that faster than the current implementation?
I'd expect it to make FastWriteCounter faster since it would remove the need for a lock