ocaml-multicore / domainslib

Parallel Programming over Domains
ISC License
171 stars 30 forks source link

Remove closure allocation in Chan #28

Closed ctk21 closed 3 years ago

ctk21 commented 3 years ago

This PR removes an unnecessary closure allocation in recv' and send' by factoring out the loop function in each and making recv'/send' recursive . It also adds a simple task_throughput test program which is quick and easy to see the impact of task changes.

For OCAMLRUNPARAM=v=0x400 task_throughput.exe 4, I see:

ctk21 commented 3 years ago

(rebased to pick up #30 for the CI)