News for hackers. Stuff that matters.
Re:Generics can make your Go code slower by RedShift1 on Wednesday March 30, 2022 @03:56PM (#30860053)
250 vs. 50000 req/s seems like a too big of a difference to me. Sure Go is faster than Node but Node is no slough either, you might want to dig in some deeper why you only got 250 req/s with Node.
Re:Generics can make your Go code slower by akvadrako on Wednesday March 30, 2022 @05:39PM (#30861129)
That could mostly be due to multithreading. That comes free with go but requires a different model in node.
Re:Generics can make your Go code slower by lultimouomo on Thursday March 31, 2022 @02:19AM (#30864359)
50000/250=200, that is a lot of cores!
Re:Generics can make your Go code slower by fileeditview on Thursday March 31, 2022 @03:50AM (#30864849)
That calculation assumes that Go and Node have the same performance and the only gain is by parallelism. But I agree.. the performance difference seems strange. On a 1 core basis I'd expect something like a factor 2-5 gain.
Re:Generics can make your Go code slower by adonovan on Sunday April 03, 2022 @12:35AM (#30894491)
Identical algorithms (e.g. quicksort) run ~40x faster in Go than Ruby in a single thread due to more efficient CPU usage, even when you avoid the kinds of steps that would allocate objects in Ruby. Multiply by 64 cores and it’s easy to observe a 1000x improvement with very little difference in the code.
Re:Generics can make your Go code slower by KwisaksHaderach on Wednesday March 30, 2022 @05:50PM (#30861249)
Doesn't sound unrealistic if you have a mix load of IO and raw processing.