3 ms·
Good for you! I read all of the other guys asking, "but why didn't you do this? ..." I myself am a throwback from the C/C++ days and I frequently re-write stu
by scumola 16y ago
Good for you! I read all of the other guys asking, "but why didn't you do this? ..." I myself am a throwback from the C/C++ days and I frequently re-write stuff in C. That's how it's supposed to be done. Write as much as you can as fast as you can up-front, then optimize your bottlenecks using more efficient methods. I'm happy that C improved your situation that drastically. I agree that the overhead of lighttpd, then apache, then php might have been the real killer in your situation, and using memcache might have helped also, but making a simple C server using fork() to handle processes and not opening it up to the world is a very good solution in my book. People think that if enough people start writing things in C, that they'll have to start doing it too - I think that's the reason for all of the backlash. Remember, there are a bunch of C and C++ programmers out there doing things that perform well and scale, but your audience on HN is mostly php/python/java programmers and web startup people who go the route of optimizing using more trendy technologies instead of down-shifting into a language like C. More power to you, fellow C programmer! :)