|
Leszek Swirski
@
leszekswirski
Munich, DE
|
|
@v8js hacker. He/Him
|
|
|
110
Tweetovi
|
23
Pratim
|
383
Osobe koje vas prate
|
| Tweetovi |
|
Leszek Swirski
@leszekswirski
|
2. velj |
|
I'm never 100% sure if Fs in chat are sincere. I'm not even sure if the people sending them know if they're being sincere or not.
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
30. sij |
|
Like a particularly deep pimple?
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
25. sij |
|
I tried Leszek and had no luck, so I optimistically tried Swirski and it's a picture of a fucking mite.
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
25. sij |
|
I've got one where I confused MB with KB through the entire talk, and people were like "wow, that's quite a high minimum file size" and I was like "yup" without realising they think it's 1000x larger than what I think I'm saying.
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
10. sij |
|
Our todo list: pic.twitter.com/KxA0fcHxIx
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
6. sij |
|
Cool sidenote: you can actually have unnamed function declarations too, using export default in a module:
export default function() {}
I don't think the hoisting behaviour is visible in this case though, since there's no name to hoist :)
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
6. sij |
|
The terms you're looking for is "function declarations" (which are hoisted) vs. "function expressions" (which are just expressions, so evaluated when they are reached) that are assigned to a variable, where the function expression can be "named".
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
25. pro |
|
I've played around with this a bit, you can get pretty far with force-inlined wrapper functions that set up the registers/stack correctly with inline asm, and more inline asm in the "real" function to read them back out again.
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
21. pro |
|
At least that will be the case in bytecode execution, optimized code might inline the function and will then be able to escape analyze the object creation away, making them equivalent again.
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
21. pro |
|
Well, the jumps and throw should be gone by now, so `(({x,y})=>x+y)(p)` will be roughly equivalent to `(p=>p.x+p.y)(p)` or `((x,y)=>x+y)(p.x, p.y)`, but object creation still has overheads so `(({x,y})=>x+y)({x,y})` is slower than `((x,y)=>x+y)(x,y)`
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
20. pro |
|
... and memory savings from pointer compression :)
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
19. pro |
|
Fixed, using the age-old approach of "I dunno, add more divs"
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
18. pro |
|
undefined?.is?.a?.function?.()
|
||
|
|
||
| Leszek Swirski proslijedio/la je tweet | ||
|
V8
@v8js
|
18. pro |
|
V8 hits its long-awaited v8.0, now with optional chaining, nullish coalescing, faster higher-order builtins — oh and 40% less memory use thanks to pointer compression, no big deal.
h8rs gonna h8, V8ers gonna V8 🔥🔥🔥
v8.dev/blog/v8-releas…
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
18. pro |
|
Uff, guilty, didn't think to test in Firefox. I'll get it fixed (and tested!) tomorrow.
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
17. pro |
|
Really it should be showing the difference in bit pattern -- there's like a solid three bits not changing for each of those lowercase ASCII letters...
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
17. pro |
|
I'm looking forward to it! twitter.com/MoreVMs/status…
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
5. pro |
|
Obviously I mean `function(x) { return y; }`
|
||
|
|
||
|
Leszek Swirski
@leszekswirski
|
5. pro |
|
Well, `x=>y` is faster to parse than `function x() { return y; }`, since the non-parens arrow argument can lookahead for => therefore skip the ambiguity, and all the identifiers are < 2 chars so they don't trigger the keyword check -- so I guess "it depends" is still not wrong :)
|
||
|
|
||
| Leszek Swirski proslijedio/la je tweet | ||
|
Cassetteboy
@Cassetteboy
|
5. pro |
|
New! Cassetteboy vs Boris Johnson pic.twitter.com/b7QKvGJBwn
|
||
|
|
||