[–] zbanks 15y ago ↗ This implementation claims to take SUM(argv) ticks, whereas the original sleepsort took MAX(argv) seconds.Is this an error, or is something done fundamentally different? [–] rgabo 15y ago ↗ It takes SUM(argv) as opposed to MAX(argv) as originally stated, which was wrong.Every argument will put itself back into the event loop (tick) N times until it actually prints the value so we need to SUM the values and not just take the MAX.
[–] rgabo 15y ago ↗ It takes SUM(argv) as opposed to MAX(argv) as originally stated, which was wrong.Every argument will put itself back into the event loop (tick) N times until it actually prints the value so we need to SUM the values and not just take the MAX.
[–] strmpnk 15y ago ↗ For those missing the sleep-sort reference: http://dis.4chan.org/read/prog/1295544154
4 comments
[ 3.3 ms ] story [ 15.3 ms ] threadIs this an error, or is something done fundamentally different?
Every argument will put itself back into the event loop (tick) N times until it actually prints the value so we need to SUM the values and not just take the MAX.