Hacker Timesnew | past | comments | ask | show | jobs | submit | asbut's commentslogin

250 requests per second is high?

Maybe they should start to use an SSD and some decent software.


250 HTTP request per second of static files is peanuts (heck, my website can sustain 10 thousand). But 250 HTTP requests affecting dynamic content on bitcointalk.org is a bigger engineering pb: the average page is 100kB of dynamically rendered HTML supporting per-user theme, and most HTTP requests modify content (forum post) or are expensive requests (post searches).

Theymos has been improving the forum software, and is offering bounties to people to implement certain things.


The problem seems to be that you can't do tail calls with the C calling convention.

For example, let's say a 0-argument function tail calls a 1-argument one: the 1-argument function expects an argument on the stack, so the 0-argument function must push one.

However, when the 1-argument function returns, the argument will still be on the stack, because with the C calling convention the caller removes arguments from the stack.

But the caller called a 0-argument function, so he won't remove any argument, and thus the stack is now misaligned due to the argument left over there, which will crash the program soon.

However, just switching to the Pascal/stdcall convention, where the callee removes arguments from the stack should just work; it might be slightly slower, but on all modern architectures (i.e. those that aren't x86-32) parameters are going to be passed in registers anyway for must functions, so it shouldn't matter.

The problem of that is that non-varags functions cannot be called with a varargs prototype; this is an issue with K&R C that allows calling undeclared functions, but isn't an issue with Rust.

So, I'm not quite sure why Rust doesn't just switch calling conventions and support tail calls.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: