I am writing a script to tokenize file contents. I\'ve written a tokenizer in JavaScript, but it gets pretty slow with large files (5+ seconds). Since I\'m retrieving the fi
Well, like you alluded, JavaScript is executed on the client side, so it would depend on the client. For example, a client on an iPAD wouldn't be able to run those Quake3 HTML5s as smoothly as a client running on a gaming machine. PHP on the other hand runs on the server.
In general, JS is faster considerably than PHP though (on the same hardware);
Here are some [hard figures][1] of tests between the two, to back up my assertion. [JS (query) vs PHP][2] Performance.
[1]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/php.html [2]: jQuery vs. PHP - Performance Comparison