.@mathias don't you think that native support of @typescriptlang by browsers would have much higher average perormance impact than #WebAssembly? So that we rely less on type predictions by engines at runtime.
-
-
We could treat type annotations as hints, which might work well if code adheres to them, but still requires type checks. This also raises the question of how to efficiently check that an object satisfies a type script interface (which V8 currently doesn't need to do).
-
But would you guys confirm the fact that typescript not only allows safer code but also improves performance meaning that turbo fan will need to do less deoptimizations?
- 1 more reply
New conversation -
-
-
Also, knowing that every argument object of a function implements a specific interface doesn't mean that properties of said interface can be loaded quickly; that depends on V8 observing that all argument objects have the same/a similar layout (which is a different thing).
-
Are you referring to the shape here? Like number can be smi, heapnumber, etc.
- 1 more reply
New conversation -
-
-
If large parts of code are typed in a sound way, i.e. such that V8 can rely on the types we could get away with type checks at the boundaries of these fragments. But how to identify those fragments & boundaries? (Crossing the boundary is now expensive because of type checks)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
So I'd say using type script types for optimization is definitely an interesting and even promising idea, but it's not straight-forward to do so.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.