1. 35
  1.  

  2. 1

    A thing I’m trying to wrap my head around is, how do you implement skipped updates with this? e.g. in React, when a component subclasses PureComponent and all its state&props are shallow-equal with its previous state&props, or its shouldComponentUpdate() method returns false, the library will reuse the previous value returned from its render() method. This is pretty easy (*) in JS because those are heap allocated immutable objects so you just share them. But here you destroy the entire contents of the arena each time you “frame swap”.

    Might a sensible implementation be: if a component declares that its previous output can be reused, copy the whole output from the previous frame in one block call to memcpy()?

    (*though perhaps it causes fights with the GC later if you are trying to make it perform as fast as possible)