Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #18850
| From | John-Paul Stewart <jpstewart@personalprojects.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: poor performance while processing a file one byte a time |
| Date | 2022-01-20 12:38 -0500 |
| Message-ID | <j4tkvvFikcU1@mid.individual.net> (permalink) |
| References | <ssbqrm$46r$1@gioia.aioe.org> <j4tfnoFu1qqU1@mid.individual.net> <ssc2a3$1v7f$1@gioia.aioe.org> |
On 2022-01-20 11:23, Mateusz Viste wrote: > >> (There's nothing specific to PHP about that advice either. It's >> equally applicable to C, although modern C compilers _may_ make that >> optimization for you.) > > That's hardly applicable in C, since there is no "foreach" in C. There > is a "for", and it's initialization argument is processed exactly once. I was speaking more broadly about pulling invariant code out of any and all loops regardless of where it appears in said loop, rather than relying on the interpreter or compiler to handle it for you.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 15:16 +0100
Re: poor performance while processing a file one byte a time John-Paul Stewart <jpstewart@personalprojects.net> - 2022-01-20 11:08 -0500
Re: poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 17:23 +0100
Re: poor performance while processing a file one byte a time John-Paul Stewart <jpstewart@personalprojects.net> - 2022-01-20 12:38 -0500
Re: poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 19:49 +0100
Re: poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 17:37 +0100
Re: poor performance while processing a file one byte a time John-Paul Stewart <jpstewart@personalprojects.net> - 2022-01-20 12:41 -0500
Re: poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 19:47 +0100
Re: poor performance while processing a file one byte a time Arno Welzel <usenet@arnowelzel.de> - 2022-01-20 19:23 +0100
Re: poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 19:45 +0100
Re: poor performance while processing a file one byte a time Arno Welzel <usenet@arnowelzel.de> - 2022-01-20 20:27 +0100
csiph-web