realFlowControl / 1brc

MIT License
30 stars 13 forks source link

Use PCNTL and shmop instead of parallel #4

Open matei88 opened 3 months ago

matei88 commented 3 months ago

Not everyone has a ZTS build or wants to set one up to use parallel. So, I created a 'threaded' version using PCNTL and shmop for process communication. It adds a small overhead of about 0.016s for calculating 'threads' output, but it works nicely!

shmop it set to use 1MB of memory per thread, which should be more than enough