News for hackers. Stuff that matters.
Re:Sleeping Through the Technical Interview (2022) by Tainnor on Sunday July 09, 2023 @09:19PM (#36660897)
If you just repeat the same number a million times, then the threads will all be scheduled to run at the same time, but of course, your computer doesn't have a million cores, so the threads will have to be executed partially in sequence. That means, even if you assume the largest integer is a constant (valid for some integer types, but notably not Integer in Haskell), the runtime will be proportional to the number of elements in the list.

There are no comments on this comment yet.