Hacker News new | ask | show | jobs
by echelon 2136 days ago
This is going to become more and more common for media intensive applications.

https://vo.codes uses a Rust HTTP web framework. It's not C++, but it's the exact same use case. High performance compute.

It's not unheard of for ordinary CRUD websites, either. IIRC, the first version of OkCupid was written in C++.

1 comments

How much more performant is C++ or Rust?

Didn’t Instagram manage to scale Python?

For small teams, wouldn’t the performance of Rust be offset by the productivity lost by not using Python, for example?

Assuming expert programmers in each language.

A lot of Python is coordinating other libraries written in native code, so that part is probably about the same. However, take parsing JSON, which is often used for web RPC, Python is orders of magnitude slower in many cases. In one benchmark, parsing a 100MB array classes with floats, the time within the program after loading the string took around 12s for Python and 0.9s in C++. That is probably extreme, but it negated startup/warmup time and most aspects other than parsing/reifying the data.

But then when you look at memory overhead and scale out, the number of servers/instances needed is both more and for a longer time. This has a cost.

The difference is, getting developers proficient in Python is much easier, and if you cannot get people to make your things, it's kind of a problem. If the majority of the program is inside the library, the performance difference starts to go away in many cases.

I mainly develop serves in C++ but I've used Python. It is my private opinion but when we are talking reasonable size project I do not feel I am loosing any productivity by using C++. Rather the other way around.