Closed Ambrevar closed 1 year ago
I was hit by a performance issue: count-cpus in a tight loop... I suppose because of a system call.
count-cpus
Considering the number of CPUs is unlikely to change at runtime, maybe memoize the function?
It's memoized by default now, with an option to run it without memoization.
Excellent, thanks!
I was hit by a performance issue:
count-cpus
in a tight loop... I suppose because of a system call.Considering the number of CPUs is unlikely to change at runtime, maybe memoize the function?