Ancestors

Toot

Written by Ondřej Synáček :file_manager: on 2024-11-29 at 07:13

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

Descendants

Written by Ondřej Synáček :file_manager: on 2024-11-29 at 07:13

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

Written by JF Bustarret on 2024-11-29 at 08:00

@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

Written by Ondřej Synáček :file_manager: on 2024-11-29 at 08:05

@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

Written by JF Bustarret on 2024-11-29 at 08:05

@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

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113565000259707274
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
271.403012 milliseconds
Gemini-to-HTML Time
1.898313 milliseconds

This content has been proxied by September (ba2dc).