Laythe-lang / Laythe

A gradually typed language originally based on the crafting interpreters series
MIT License
65 stars 4 forks source link

Optimize channel #159

Closed jonnyboyC closed 2 weeks ago

jonnyboyC commented 2 weeks ago

Problem

Our channel is pretty unperformant in that we are doing a lot unnecessary work. Two things we are doing that has a pretty massive performance impact.

Solution

We move our waiters to VecDeque and treat them as simple queues. When we dequeue we now check if the fiber is complete which should be a simple equaity check.