Hacker News new | ask | show | jobs
by yangbo 3428 days ago
Given a component that contains n elements, and you want to update k elements at a time, ReactJS requires O(n) time for virtual DOM differentiation, and Binding.scala only takes O(k) time.

As a result, Binding.scala is fast when k < n (aka partial updating), even faster than vanillajs written by a common human for some cases. Check the rows "partial update", "select row", "swap rows", "remove row" in the benchmark.

1 comments

Nobody cares when it is 6ms instead of 3ms for partial updates. What is really important is how fast you can create and remove huge amount of nodes (switching pages in SPA, etc), because it is already takes a huge amount of time, and Binding.scala just adds a huge overhead to this cases.