natefaubion / purescript-spork

Elm-like for PureScript
MIT License
157 stars 9 forks source link

Would it be safe to use "mutable array" inside `EventQueue`? #33

Closed paluh closed 4 years ago

paluh commented 4 years ago

Currently EventQueue uses queue :: Ref (Array i) which is quite inefficient. Do you think that it can be safely replaced by something like "mutable array reference"?

paluh commented 4 years ago

To be honest we would need something like mutable queue... So it is not as trivial to provide it as a mutable array :-)

natefaubion commented 4 years ago

I think this is probably a premature optimization regardless. This usually only has a handful of things in it max. It’s very unlikely to be a bottleneck.

paluh commented 4 years ago

I think this is probably a premature optimization regardless.

You are probably right. Thanks!