Halo, it’s been a long time! I am 132. The reason for this article is that a group of friends felt react was too slow, so they used fRE to test it

Stunned:

Fre is fast because it has a better offscreen algorithm and a better diff algorithm, but I didn’t expect React to be so slow

Frankly speaking, FRE2 basically broke through on its own, and React algorithm was really bad. However, if this kind of thing was not designed at the beginning, then it would be difficult to improve it later

Take a look at the fire chart

React is in sync mode, while FRE is in time slice mode. If fRE turns off time slice, it will be faster

Of course, the current algorithm of FRE, which is not the best, does not use LCS/LIS, which may be improved in FRE3

But in any case, fRE is an order of magnitude faster than react or vue, right

Even off-screen rendering is faster than native JS

conclusion

github.com/yisar/fre

If you want to know why FRE is so fast, you can check the source code, and then welcome star!

25 more to go!