4 ms·
Then please show us how it is done.
by xena 3y ago
Then please show us how it is done.
- lionkor 3y agobasic web server, for example https://github.com/lionkor/http https://github.com/lionkor/http. anything eith a real workload is kinda irrelevant here, as this benchmark only focuses on hello world.
- xxs 3y agoWriting 'hello world', or a fixed set of dispatch calls is still trivial with epoll now. In the late '90s when the web APIs (before REST) started to become a thing, writing an http C server few specific calls was quite the thing - there was no epoll, yet. Likely, I can write one (http1.1) in Java just using java.nio + DirectBuffer; no converting anything to String (similar to using void* for everything)... in several hours. It'd even scale with the amount of cores the machines has. It won't do much but as a micro benchmark (hello world) would be up there. That's nothing about usefulness of the code, or skill - it's just the benchmark is not useful for anything outside toying with.