klionks.blogg.se

Backbone js vs react
Backbone js vs react













backbone js vs react
  1. #Backbone js vs react update#
  2. #Backbone js vs react code#

#Backbone js vs react code#

That's a ton of magic and doesn't include all the magical code generated to wire everything together. * tons of stuff using the element directive syntax * custom await, promise, and handler syntax * multiple variants of the custom loop syntax * Uppercase HTML is special (I really don't understand this one as this seems like the perfect opportunity to go all-in on web components) Everything mentioned here is NOT part of either the HTML or JS spec. Let's look at Svelte's special syntax going over the docs. Truth be told, that is based on a subset of the now deprecated e4x standard. React has one and only one syntactic conceit which is JSX. Inferno is faster overall while not being particularly worse in any single area and better in others compared to Svelte. Inferno and Preact both have access to the wide support of the React ecosystem and tooling. Startup time (parse to first load) is also completely unimportant with Svelte at about 1.2ms faster than Inferno, but 1ms slower than Preact (which even beats out the fastest vanillaJS version).Įven the pessimistic responsiveness isn't very different with svelte being about 8% faster than Preact or Inferno. Preact memory usage is interesting as it uses more than Inferno despite not having to diff against a vdom. I'd argue that memory usage for any of these will be dwarfed by actual data and the DOM itself. Maximum memory difference between Svelte and Inferno is negligible too at only 9%. This isn't surprising since Preact is about 9kb unzipped (less than 4k zipped) and Inferno is about 21kb unzipped (less than 9k zipped). That's an 11% payload difference between Inferno and Svelte and a less than 5% difference with Preact and Svelte. Svelte JS 1.26 (12.6% faster than Preact) Inferno JS 1.10 (14.5% faster than Svelte)

backbone js vs react

Vanilla JS 1.04 (5.8% faster than Inferno) (note: Preact 10.1 is out and this uses 10.0)

backbone js vs react

Otherwise, what I wrote is what I'll see.Ĭomparing average numbers in that chart, Preact is 22% faster than React, Svelte is 12.6% faster than Preact and Inferno is 14.5% faster than Svelte. When I compile a React-style component into ES7 and run it in the brower, I have to deal with webpack for imports and I have to understand that JSX is really just JS functions. I then have to learn how their compiler works behind the scenes when its time to debug the code I wrote. I have to learn their proprietary syntax and markup.

backbone js vs react

This gets at my biggest issue with such frameworks. It actually compiles behind the scenes into a completely different set of reactive code. Preventing all that extra garbage goes a huge way toward keeping those vdoms efficient.Īs to svelte in particular, you aren't "just using an equals". Newer ones can do things like re-use existing sub-trees or recycle vdom objects (they can also recycle the associated real DOM nodes too).

#Backbone js vs react update#

I doubt this would be possible without a vdom or something very similar to track all changes before deciding batches and update priority.Īlso, remember that vdoms have gotten a lot more efficient too. React's Fibers do some cool batching behind the scenes which means that large updates (especially constant ones like animations) don't have large negative impacts on user interaction. They still haven't gotten the vanilla benchmark up to the same speed. Stdweb is the real thing to keep your eye on as it seems to show that WASM can be every fast. InfernoJS is massively faster than Svelte or Preact (the benchmark author had to do some rather convoluted re-writes of vanillaJS over the years to keep ahead) and it uses a virtual DOM, but has a few optimizations that React doesn't have or can't use due to its external API. I'd note that authors from most of the frameworks represented have submitted their own optimizations, so performance isn't strictly based on the author's familiarity. Preact diffs against the real dom and is faster than Svelte in benchmarks while the library is only around 3.5kb (the minified code fits easily on a single screen).















Backbone js vs react