5 ms·
I think his point was just that you could hard-code your list of words into the code. It would be ugly, but it would work.
by degroat 14y ago
I think his point was just that you could hard-code your list of words into the code. It would be ugly, but it would work.
- pan69 14y agoIsn't that the same as loading them from file on each request?
- cheald 14y agoNo, because you don't have additional IO overhead.
- pan69 14y agoI think that overhead would be negligible, especially if the other examples are all based on micro-frameworks (i.e. loads of files). Premature optimisation is the root of all evil, right?
- cheald 14y agoDisk IO is a massive problem at scale. This obviously isn't "at scale", so it works fine here, but avoiding hitting the disk (edit: any slow IO, really) is Performance 101.
- lmcnearney 14y agoYou would also want to install an opcode cache like APC, XCache, etc. That way the code is only compiled on the first page load. http://en.wikipedia.org/wiki/List_of_PHP_accelerators http://en.wikipedia.org/wiki/List_of_PHP_accelerators