Does anyone have good performance comparison between #javascript and #golang? You read a lot how certain (usually compiled) languages are more performant and I wonder whether there was an article comparing these two and what are the hypothetical scenarios where one does better than the other. (1/2)
=> More informations about this toot | More toots from ondrej@social.synacek.org
For example - should I build my server in Go if I expect the traffic to be in lower thousands of requests per minute? Or is this something that NodeJS/Bun runtimes handle just fine, given it's running on decent hardware.
(This is just an example - I just gave those numbers as examples and have no idea what the real figures would be) (2/2)
=> More informations about this toot | More toots from ondrej@social.synacek.org
@ondrej Most benchmarks are partly/mostly useless, because they never run code as complex as a real world application.
The two most important properties are :
Unless your app is very CPU intensive or RAM intensive, I would say that the right choice is the language you know better.
=> More informations about this toot | More toots from jfbus@piaille.fr
@jfbus > Unless your app is very CPU intensive or RAM intensive, I would say that the right choice is the language you know better.
Yeah that's what I thought, I think this is usually the better thing to optimize for.
Well you can spawn processes in NodeJS but I guess that won't help you with intensive tasks - so I guess goroutines are better for this (IIRC they are "small" threads).
=> More informations about this toot | More toots from ondrej@social.synacek.org
@ondrej thousands of requests per minute is not a very high requirement.
If your app is database-centric, most of the time spent is in DB queries, with a small CPU/RAM usage => both runtimes are fine.
If you build a database server or a Redis clone, do not use node.js/javascript.
=> More informations about this toot | More toots from jfbus@piaille.fr This content has been proxied by September (ba2dc).Proxy Information
text/gemini