Have you got any benchmarks for helix against reagent etc by any chance? I imagine it must get close to raw react.
I've just benchmarked the DOM macros, which are about as fast as raw React (within about 10%)
for comparison, Reagent was about 1/3 the speed of React
are those numbers available somewhere?
the benchmark I used for the DOM/create-element macros is here: https://github.com/Lokeh/helix/blob/master/dev/workshop/core.cljs#L206 it’s very simplistic.
The reagent benchmark I did awhile back to compare reagent’s hiccup interpreter, hx’s hiccup interpreter, and raw React
https://github.com/Lokeh/hx/blob/master/benchmark/hx/benchmark.cljs
these kinds of microbenchmarks do not mean a whole lot as an application developer
but it can be important when comparing certain use cases. For instance, if you have a lot of reagent components in a hot path of your app, you might start to care about the overhead of creating and interpreting all those vectors
the upper bound of how fast a single component can render will always be higher in helix/React than in anything that uses hiccup at runtime
but often Reagent can optimize things in different ways where less things re-render, due to its mutable reactive atom approach
Helix adopts React’s paradigm where you often end up re-rendering more of the component tree than you need to. So you really want every render to be really fast.
for the simple helix benchmark above, I get:
• baseline React.createElement
: 50000 runs, 867 msecs
• using helix.dom
and $
: 50000 runs, 980 msecs
• using helix.dom
and $
with dynamic props (div {& props})
: 50000 runs, 1409 msecs