DEV Community

Discussion on: Processing One Billion Rows in PHP!

Collapse
 
frantisek-heca profile image
Frantisek Heca

If, after php optimizations, the speed is capped mostly by the "line reading". I do wonder, if it is allowed to install any extension in this test? The idea is to "hack" customized version of the "stream_get_line" just for this scenario.

Collapse
 
realflowcontrol profile image
Florian Engelhardt

I mean I had to install ext-parallel in order to run threads in user land. I guess something that is specifically targeted at the 1brc challenge might count as cheating, but some extensions that do exist already, like ext-ds for data structures, why not? I am currently unaware of an extension that bypasses the PHP stream layer, but something like this could help.