DEV Community

loading...

Discussion on: Making a fast "yes" clone with Go

Collapse
juancarlospaco profile image
Juan Carlos

Nice read, interesting exercise on the post.

import strutils
proc main() =
  while true: echo static("y\n".repeat 10_000_000)
when isMainModule: main()
Enter fullscreen mode Exit fullscreen mode

Nim version, 2 Gb/s, not code golfed.

Collapse
rubenwap profile image
Ruben Sanchez Author

Interesting! I have just edited because I found a tweak to make it slightly faster, but I am still far from the speeds reported in the linked posts.

Collapse
juancarlospaco profile image
Juan Carlos

Probably the garbage collector may be struggling a little,
Nim can use the Go GC and it feels slower sometimes.