nevalang / neva

🌊 Flow-based programming language with static types and implicit parallelism. Compiles to native code and Go
https://nevalang.org
MIT License
85 stars 7 forks source link

`BufferSize` for channels in runtime #665

Open emil14 opened 1 month ago

emil14 commented 1 month ago

We have opportunity to set buffer size for channels (ports) in IR but we don't do that.

  1. Make sure it won't broke anything
  2. Figure out how to properly set it

About second part - we might try to somehow automatically calculate (e.g. based on amount of senders/receivers) or expose to user. Or even combine!

Related to #663 and #644

emil14 commented 1 month ago

As we know from #644 in new design we have one queue for all senders. This design isn't perfect because we have a bottle-neck because of 2 reasons

Obvious idea to scale this is to add more queues. One queue per fan-in

Each fan-in has N senders to 1 receiver. We could use that N as a buffer size.