helix

https://github.com/Lokeh/helix
danielneal 2020-01-16T11:51:07.001Z

Have you got any benchmarks for helix against reagent etc by any chance? I imagine it must get close to raw react.

lilactown 2020-01-16T16:41:19.002900Z

I've just benchmarked the DOM macros, which are about as fast as raw React (within about 10%)

lilactown 2020-01-16T22:40:07.003300Z

for comparison, Reagent was about 1/3 the speed of React

Ian M 2020-01-16T23:05:09.003600Z

are those numbers available somewhere?

lilactown 2020-01-16T23:14:10.005Z

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.

lilactown 2020-01-16T23:14:21.005400Z

The reagent benchmark I did awhile back to compare reagent’s hiccup interpreter, hx’s hiccup interpreter, and raw React

lilactown 2020-01-16T23:15:24.006200Z

these kinds of microbenchmarks do not mean a whole lot as an application developer

lilactown 2020-01-16T23:16:20.007200Z

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

lilactown 2020-01-16T23:17:05.008100Z

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

lilactown 2020-01-16T23:17:30.008600Z

but often Reagent can optimize things in different ways where less things re-render, due to its mutable reactive atom approach

lilactown 2020-01-16T23:18:10.009300Z

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.

lilactown 2020-01-16T23:23:07.011Z

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