Skip to content

Instantly share code, notes, and snippets.

@Nakilon
Last active November 2, 2016 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nakilon/f317c4975a1e8dc99f85dda8a955d9fb to your computer and use it in GitHub Desktop.
Save Nakilon/f317c4975a1e8dc99f85dda8a955d9fb to your computer and use it in GitHub Desktop.
the most straight code perfomance comparison ever, lol
# either run it in irb or .join some thread to prevent program exit
i = 0
Thread.new do
puts i while sleep 1
end
Thread.new do
loop{ i += 1 }
end
Thread.new do
loop{ i -= 1 }
end
@jaccokee
Copy link

jaccokee commented Nov 2, 2016

Maybe have a winner if it ever reaches -100 or 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment