Yes, I get that about arrays. I was rather thinking about arrays vs generators, as compared to compilation ahead of time vs just-in-time compilation. I don't know what languages you are used to but I believe that generators are not unique to PHP. I did a benchmark on a simple generator vs array the other day where a million-element long array with its printing took about 35.7MB of memory and the generator took 544 bytes. Quite the difference!!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes, I get that about arrays. I was rather thinking about arrays vs generators, as compared to compilation ahead of time vs just-in-time compilation. I don't know what languages you are used to but I believe that generators are not unique to PHP. I did a benchmark on a simple generator vs array the other day where a million-element long array with its printing took about 35.7MB of memory and the generator took 544 bytes. Quite the difference!!