Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18855

Re: poor performance while processing a file one byte a time

From Mateusz Viste <mateusz@xyz.invalid>
Newsgroups comp.lang.php
Subject Re: poor performance while processing a file one byte a time
Date 2022-01-20 19:49 +0100
Organization . . .
Message-ID <sscar2$kme$3@gioia.aioe.org> (permalink)
References <ssbqrm$46r$1@gioia.aioe.org> <j4tfnoFu1qqU1@mid.individual.net> <ssc2a3$1v7f$1@gioia.aioe.org> <j4tkvvFikcU1@mid.individual.net>

Show all headers | View raw


On Thu, 20 Jan 2022 12:38:06 -0500
John-Paul Stewart <jpstewart@personalprojects.net> wrote:

> 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.

Ah, so you were answering a question that wasn't asked, and that is
irrelevant to the case at hand. Okay, that's fair. It's what the
usenet is all about after all. ;-)

Mateusz

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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