Miško Hevery (Builder.io/Qwik) Profile Banner
Miško Hevery (Builder.io/Qwik) Profile
Miško Hevery (Builder.io/Qwik)

@mhevery

51,405
Followers
454
Following
283
Media
5,770
Statuses

CTO at @builderio , creator of @QwikDev , @angular , @angularjs , co-creator of #karmajs

Saratoga, CA
Joined May 2008
Don't wanna be here? Send us removal request.
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
`a = 0-x` is about 3-10x faster than `a = -x` 🤯 Let's jump into JavaScript VM details to see why and how to guard against this VM de-opt: 🧵🪡🧶
Tweet media one
61
812
4K
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
JSX could have been 2x faster if it was designed more optimally for JS VMs! Let's see what design decisions make JSX slow and how we could speed it up. 🧵🪡🧶
Tweet media one
43
337
3K
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
How can `a+b` be almost 4x faster than `b+a`? 🤯 1/6
Tweet media one
50
423
3K
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
useSignal() is the future of web frameworks and is a better abstraction than useState(), which is showing its age. 🧵🪡🧶
Tweet media one
47
243
2K
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Make your code faster with Bloom filters. They are like HashMaps but smaller and allow you to short-circuit more expensive operations. 🧵🪡🧶
Tweet media one
50
214
2K
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
useEffect is a bad abstraction There is a better way: 🧵🪡🧶
Tweet media one
33
230
2K
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Did you know that without 0x5F3759DF (magic number) Qake (the game) would not have been possible? The fast inverse square root is 🤯 code popularized by Quake, which at first sight looks like complete nonsense. Google: 0x5F3759DF 🧵🪡🧶
Tweet media one
30
184
2K
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Strongly prefer `===` over `==`! `==` is complex to reason about and can be up to 15x slower then `===` 1/5
Tweet media one
42
181
1K
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Understanding monomorphism can improve your JavaScript performance 60x. Curios to find out more, read this thread.
Tweet media one
24
222
1K
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
React’s upcoming compiler will not solve prop-drilling, but Signals solve it well. 🧵🪡🧶
Tweet media one
40
149
1K
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Amdahl's law: the nightmare of a perf engineer! "The overall performance improvement gained by optimizing a single part of a system is limited by the fraction of time that the improved part is actually used"
Tweet media one
18
146
1K
@mhevery
Miško Hevery (Builder.io/Qwik)
3 years
After 15 years at Google and 10 years on @angular I am excited to announce that I am moving onto the next chapter in my professional life. I will be joining @builderio as their CTO to help empower anyone to create blazing fast sites, with some very exciting updates coming soon.
78
63
964
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Lazy loading in frameworks is a lie! (And then we blame the developer for slow sites.) 🧵🪡🧶
22
129
896
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
It's best to name your variables positively. Negative variables take longer to process in your brain because they can be part of negated expressions, creating double negatives.
Tweet media one
25
102
858
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Do you know why signals are all the rage now? Solid has them, preact, and now angular is working on them. This is why I think it's the future...
22
117
754
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
After months of hard work and community feedback, we are excited to announce Qwik RC! V1 is just around the corner, so we would really value your feedback on this. Find out more on our blog:
32
141
739
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
Hydration is a widely accepted solution to add interactivity to HTML, but we need to accept it for what it is: a clunky workaround. It is time to move past hydration for a faster web:
13
96
674
@mhevery
Miško Hevery (Builder.io/Qwik)
7 months
Lazy-loading is like exercise. Everyone says they are doing it, few are, and those that are rarely know what they are doing. Frameworks were not designed with lazy loading in mind. It was a late addition to their development life cycle. We now pay the price of bloated apps. /1
Tweet media one
9
84
588
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Understanding: useState() vs useSignal() Signals scale better because they track subscriptions and render only the necessary components. Signals are surgical! State does not track who is listening and, therefore, must always re-execute all templates below it.
Tweet media one
9
74
577
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Everyone is excited about signals because of better DX and faster updates. I am excited about signals because of the lazy execution of code => Better startup performance on slow networks and slow devices. 🧵
Tweet media one
5
57
581
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
You keep using that tag: <link rel="prefetch"> I don't think it does what you think it does.
Tweet media one
8
61
566
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
🎉Qwik is now in BETA! 🎉 After months of hard work by @adamdbradley and @manucorporat @builderio is excited to announce @QwikDev (and Qwik City) is in BETA and ready to power your instant apps!
33
148
554
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Blank page with an embedded tweet. How bad can it be? JS: 1.5MB 🤯 PageSpeed score: 61/100 🤯 Time to Interactive: 9 sec 🤯 TBT: 1.7 sec 🤯 What hope does an average site have if a simple tweet requires MegaBytes of JS and seconds to interactivity?
25
66
533
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
It took me a long time to understand the value of React. Here are a few things that React nailed, and it is worth learning from. - Components are functions - Simplicity of JSX - Composability of hooks. - Explicitly not solving some things. 1/5
17
54
520
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Want to know what all the fuss is about Signals vs. Observables? I wrote an article on this, but check this thread out for a quick TLDR. 1/6
7
102
466
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Colocating client/server code in a single file is the next battleground for better DX between meta frameworks. Let's zoom into what it is! 🧵🪡🧶
Tweet media one
22
42
447
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
In engineering, rarely is A always better than B. Usually, A and B come with a long list of PROS and CONS. Your job as an engineer is to figure out which PROS matter and which CONS you can live with.
11
88
451
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Deoptigate is an awesome tool that annotates your source code showing you where the slow property access is.
8
79
432
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
The curse of engineering is that everything is obvious after the fact. The fact that it took you n weeks and a half dozen design docs to figure it out is instantly forgotten.
7
65
419
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
History of Reactivity: My journey of how I got to signals. As always, we all stand on the shoulders of giants.
9
60
412
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
One must be very careful when doing performance testing, or you end up convincing yourself of things that don't hold in real-world applications. 6/6
11
14
381
@mhevery
Miško Hevery (Builder.io/Qwik)
10 months
At Berlin central train station. It is an engineering marvel! Trains on multiple levels. My mind is blown.
Tweet media one
16
11
377
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Innovations of different frameworks from my perspective. @angular , React, @sveltjs , @solid_js , @QwikDev 🧵
10
70
372
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
this.age++;
48
3
366
@mhevery
Miško Hevery (Builder.io/Qwik)
6 months
We don't download the whole movie before starting to watch it. Why do we have to download the whole application before it becomes interactive? Imagine a world where the Application could be streamed to you in the same way as Movies.
22
54
342
@mhevery
Miško Hevery (Builder.io/Qwik)
6 months
The fact that this works in @QwikDev surprised even me! But this is what we mean by "unified execution model."
20
61
338
@mhevery
Miško Hevery (Builder.io/Qwik)
6 months
Software engineering is about tradeoffs. Let's talk about how data fetching happens in different meta-frameworks and what the trade-offs of those approaches are.
17
58
330
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
What is a hashing function, and how does it relate to HashMaps?
Tweet media one
5
35
304
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
My talk from #ng -conf on WebApps at Scale looks into how we got here and what kind of challenges lie ahead.
Tweet media one
11
56
296
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
@MaxRovensky You don’t need to care. But it is sometimes nice to know how things work under the hood.
1
2
300
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Understanding how JavaScript Virtual Machines work can have up to a 60x performance impact. Learn all about monomorphism and how it impacts performance in my latest blog post:
2
59
296
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
I have built a lot of frameworks that no one has ever heard of before one became popular. - JS framework - Pagelet: DI for MPAs - ActionScript Flex Personal - ActionScript Flex Work - AngularJS <= This one became popular Keep trying until you succeed!
13
23
280
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
Resumabilty is the start of a new generation of frameworks.
Tweet media one
26
52
280
@mhevery
Miško Hevery (Builder.io/Qwik)
5 years
Watch () my presentation () on JavaScript VM performance optimizations at #AngularConnect and learnings for @angular Ivy. Play with the tools here ().
2
98
265
@mhevery
Miško Hevery (Builder.io/Qwik)
3 years
Excited to share what we’ve been working on to majorly speed up the web. We think Qwik will be a game-changer - you can read more about it
7
77
266
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
There are two kinds of developers in this world. Those that suffer from imposter syndrome and those that lack self-reflection.
12
38
259
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
Hydration is a horrible workaround because web frameworks don't embrace how browsers actually work. Yet somehow we have turned it into a virtue. Hydration is a hack to recover the app&fw state by eagerly executing the app code in the browser. That is why your app is slow.
16
37
257
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Why are all the meta-framework people suddenly talking about code extraction? It is a new way to make your code more seamless and type-safe across the client and server. I wrote about this and more of the exciting possibilities in my latest article:
3
54
250
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Understand resumability from the ground up by building your own resumable framework. 1/10
5
48
247
@mhevery
Miško Hevery (Builder.io/Qwik)
6 months
What can Remix, Fresh, Astro, NextJS, and @QwikDev teach us about the performance of websites? Let's dive into data and its implications => Performance is about not executing JavaScript!
12
48
240
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
🌶️ take Both Angular and React are dirty checking frameworks! (Not reactive) Angular dirty checks your data. React dirty checks your vDOM. PS: a good argument can be made that dirty checking data is cheaper then vDOM.
25
32
235
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Stylesheets were developed for styling documents and as such are ill suited for styling applications. Here is why, and what you can do about it:
20
42
232
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Get faster startup performance by running effects as part of SSR/SSG instead of client side. 🧵🪡🧶
Tweet media one
4
43
227
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
After months of hard work by @manucorporat , @adamdbradley , and the awesome Qwik community, we are finally here! I can't express just how much joy this gives me. It is a start of a new era for web application development.
@QwikDev
Qwik
1 year
It’s finally here… announcing Qwik v1.0! Build instantly-interactive web apps without effort Now generally available 🥳
111
614
3K
27
36
228
@mhevery
Miško Hevery (Builder.io/Qwik)
8 months
Slow apps can be made performant by: - Lazy loading (load less) - Lazy execution (do less) - Memoization (don't redo work) Most teams go through cycles of feature-dev and then optimization. But as soon as the optimization sprint is over, the app slowly regresses in performance…
Tweet media one
6
34
210
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
How do functions break up? They stop calling each other. 🥁
7
16
192
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
Software engineering is constantly banging your head against what looks like unsolvable problems with suboptimal solutions. Talk to people around you, sleep on the problems, and eventually, a beautiful and simple solution arises. Persistence is the name of the game.
8
34
193
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
My need to build frameworks is completely irrational. I see a better way of doing it and I just have to do it! I told myself no more frameworks after Angular and here I am building Qwik.
17
11
189
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
As developers, we know how to serialize: - Data => JSON - Code => file.js But how do you serialize closure (Code + Data)? Qwik's key innovation, which enables all other magic, is that it knows how to serialize closures on servers and invoke them on clients, key to Resumability!
9
23
190
@mhevery
Miško Hevery (Builder.io/Qwik)
6 months
Want to know how @QwikDev delivers instant-on applications no matter the application complexity? It's simple. Don't overwhelm the browser with 100s of KBs of JavaScript all at once, no matter how large your app gets. It's how Qwik works.
2
35
186
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
People think that apps are hard to build because JavaScript sucks, so they keep inventing new languages that transpile to JavaScript. The real reason is that we are missing proper abstractions, and that is why frameworks exist.
16
9
185
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
Awesome solutions are rarely created by committees or large organizations. It is almost always a single person with passion and vision that slowly infects others.
6
34
175
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
I strangely agree with this guy…
@FrontendMasters
Frontend Masters 💻✨
1 year
Qwik framework's philosophy of "owning the entire problem of building a web app" @mhevery His new course on Qwik:
4
11
86
12
15
169
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Checkout some of these awesome frameworks that have signals natively: @QwikDev , @solid_js , @vuejs (they call it shallowRef()), @preactjs .
Tweet media one
8
13
171
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Learnings: - Avoid using the negate operator `-x`! - Prefer the subtraction operation `0-x` to get a negative number!
Tweet media one
13
5
169
@mhevery
Miško Hevery (Builder.io/Qwik)
9 years
Would you like to help with the development of #Angular2 ? We have carved out some starter issues:
1
119
170
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Everything you always wanted to know about why Resumability creates instant-on web applications and hydration does not but were afraid to ask: 1/6
4
36
167
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
Mad props to @youyuxi and @RyanCarniato for making benchmarks on @QwikDev and then privately reaching out to us to let us fix issues. That is how OSS is supposed to work! Thank you, and I want to see more of this!
@manucorporat
Manu (Qwik)
2 years
@youyuxi @QwikDev the test involves resuming/hydrating a page with more than 200.000 nodes
0
1
37
3
14
165
@mhevery
Miško Hevery (Builder.io/Qwik)
4 months
Long time ago few of us wrote "Guide to testable code" It used to be hosted on my site, which is no longer up, but I have saved this content here:
4
23
165
@mhevery
Miško Hevery (Builder.io/Qwik)
6 months
I constantly hear the misconception that @QwikDev / Resumability is slow on the first interaction. Let me show you real-world data and a demo showing you how instant it is.
11
29
151
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
But wait! Running the same tests in opposite order results in the opposite result? Now, `b+a` is 3.6x faster than `a+B`? 🤯 Both can't be true! Welcome to JavaScript VM de-opt! 3/6
1
3
150
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
The problem with today's frameworks is not that it takes too long to render your shopping cart but that it takes too long before you can click it. So why are we obsessed with rendering performance instead of startup performance?
9
16
149
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
Your next JavaScript framework will be reactive! But reactivity is not enough, it needs to be resumable as well so we are progressing UX not just DX.
9
16
146
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Bloom filters are one of my favorite data structures. But they are also useful for speeding up your code.
2
21
148
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
I see a lot of comparisons of @astrodotbuild vs. @QwikDev on the web. Some of the characterizations, I disagree with it, so I wanted to share my point of view. 🧵
5
20
148
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
As the complexity of applications increases, the amount of JavaScript downloaded increases. The only way we can continue building more complex web applications in the future is to lazy load on interaction, not on initial load. Read more here:
6
40
140
@mhevery
Miško Hevery (Builder.io/Qwik)
7 months
Hydration? Why all the fuss? Let's dive deep into hydration and why it makes lazy-loading harder than it should be.
5
30
142
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Love the innovation that @RyanCarniato has placed in @solid_js . The reactivity composition is amazing. I think all future frames will be fine grained reactive.
4
7
143
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
ToDo app interactive under <50 ms on @Cloudflare edge pages. @QwikDev pages have this performance independent of app complexity. Check it out: (Thank you @petebd @GregBrimble @manucorporat for making this a reality.)
Tweet media one
8
19
144
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Let's assume: `x` is an Integer and `x = 0` `0-x` => `0-0 => 0`, Result is `0` (Integer) Perfect! `-x` => negate `x`. - For any non-zero value, the result is an Integer. - But for `0`, the result is `-0`. But integers can't have `-0`, So JavaScript stores it as a Float `-0`.
Tweet media one
1
14
138
@mhevery
Miško Hevery (Builder.io/Qwik)
6 months
Not all lazy loading is created equal because most systems only have one entry point. @QwikDev is different because each bundle is an entry point. This significantly reduces the amount of JS it needs to download or execute.
6
25
139
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
The rules for knowing under which conditions the VM coerces the values are complex and esoteric. 2/5
Tweet media one
2
23
135
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
I have never seen a language that transpiles to JavaScript succeed. (And I predict I never will) The semantic mismatch is never worth any marginal improvements! TypeScript is JavaScript with no semantic mismatch, and that is why it is winning!
12
9
134
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Here is a test to prove it!!! 2/6
Tweet media one
1
2
133
@mhevery
Miško Hevery (Builder.io/Qwik)
6 months
Are you wondering how @QwikDev can resume applications without eagerly downloading JavaScript?
2
16
134
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
I said this before: You either have imposter syndrome or lack self reflection.
10
12
134
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
The JIT incorrectly assumed it was safe to inline `fnA` into the test harness, because the test harness always received the same `fnA` function. (monomorphic call site.) Inlined functions run faster. 4/6
Tweet media one
2
3
133
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
But when `fnB` started running, the JIT realized its mistake (de-opt). Inlining was removed because the call is now sometimes `fnA` and sometimes `fnB` (polymorphic). So the second perf test ran without inlining (slower). The second test appears slower! 5/6
Tweet media one
3
3
133
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
I am so excited about signals in Angular, and also so proud of the Angular team for doing this!
@sarah_edo
Sarah Drasner
1 year
What if I told you Angular is about to have a renaissance? 🎆 Angular just released a new Signals reactivity primitive and it's just the first step! I made a little explainer about what it is:
78
282
2K
1
6
132
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
The first thing to understand is that JavaScript has two representations for numbers: - Integers: Fast path - Floats (IEEE 754): Slower path Integers are stored as “Two's complement” and can't have `-0`, but Floats can!
Tweet media one
2
8
130
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
useState() returns the value "in time" rather than the state "over time" it represents. This can lead to problems when value is captured in closures such as useEffect().
Tweet media one
9
15
128
@mhevery
Miško Hevery (Builder.io/Qwik)
1 year
Today the code has little use because modern CPUs can efficiently perform such operations. But it makes for a good archeological dig kind of a read.
1
4
124
@mhevery
Miško Hevery (Builder.io/Qwik)
2 years
.⁦ @angular ⁩ reunion.
Tweet media one
3
0
126
@mhevery
Miško Hevery (Builder.io/Qwik)
7 months
So proud of my oldest kid. Halloween is coming and he manufactured his own costume. Setting a goal and executing is one of the hardest things in life.
Tweet media one
Tweet media two
Tweet media three
17
1
123