fastcounter icon indicating copy to clipboard operation
fastcounter copied to clipboard

Idea: Get count value from string representation

Open lazytype opened this issue 4 years ago • 2 comments

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]).

lazytype avatar Jul 04 '20 12:07 lazytype

Is that faster than the current implementation?

jd avatar Jul 06 '20 15:07 jd

I'd expect it to make FastWriteCounter faster since it would remove the need for a lock

lazytype avatar Jul 07 '20 20:07 lazytype