Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mraleph
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
151.
▲
by
mraleph
13y ago
> But both are better than the Dart sandbox, which basically only says "error" Compilation errors are attributed to the place where they occurred and highlighted there with a red underline. Actual error is displayed on hover.
152.
▲
by
mraleph
13y ago
This is still true and unlikely to change in the observable future. There is only one update: inlining with a change of context should now be supported on all architectures. I will update the post.
153.
▲
by
mraleph
13y ago
hint: Splay is a benchmark that penalizes generational GCs. If you have a fast mark-sweep GC with an aggressive growth policy you are going to totally rock it.
154.
▲
by
mraleph
13y ago
The actual percentage depends on the CPU. On mobile the cost would likely be higher (e.g. on my phone it's around 33%), on old CPU can be even higher, but people don't usually care about them these days.
155.
▲
by
mraleph
13y ago
While in general I indeed think that people should profile code before they optimize it, I also think that they should avoid unnecessarily pessimising it by writing code that is not exactly idiomatic and is known to have an overhead. In thi
156.
▲
by
mraleph
13y ago
Fixed. It was purely my bug: I was relying on a certain ordering of propChanged() callbacks, but it does not seem like Polymer.dart guarantees any. Now it works in Chrome/FF/Safari all the same.
157.
▲
by
mraleph
13y ago
I wish I could integrate it "in-process" like Chrome Dev Tools are integrated. You still have to generate files and feed them in. With all scalability issues that follow from that. If you have any suggestions, requests, etc, pleas
158.
▲
by
mraleph
13y ago
> (amusingly, from your link: 'Does not work in Firefox (neither Stable nor Nightly), but works in Chrome Dev and Safari.') It's most likely problem with polyfills, not with dart2js compilation problem, I have not tried to
159.
▲
by
mraleph
13y ago
and here is mine with a focus on the Dart VM and V8 optimizing compilers: http://www.infoq.com/presentations/dart-compiler
160.
▲
by
mraleph
13y ago
Unfortunately right now asm.js is an unsuitable target for any dynamically typed language with garbage collection, because you have to run your whole runtime system and a garbage collector as asm.js'ied code, which is not exactly what
161.
▲
by
mraleph
13y ago
> So you are fully ok with the phrase "optimize for asm.js-style code"? I would say I am more OK with it as it highlights the fact that it's about spirit not about complete adherence to asm.js spec. Unfortunately there is
162.
▲
by
mraleph
13y ago
> the dominance frontiers algorithm AFAIK V8 does not use dominance frontier based algorithm for SSA construction. It just inserts phis eagerly at loops headers and on forward edges it inserts phis when merge is needed.
163.
▲
by
mraleph
13y ago
In this case I would better say that IE6 was a motivational example that caused me to find a performance bottleneck affecting all sites. I optimized bottleneck away.
164.
▲
by
mraleph
13y ago
> Stuff in Octane is code that is intended to be optimized for, by definition. So recursive code, numerical computation code, asm.js code, Mandreel code, functional code, etc. etc. Yep. Now look at the list of these things. Do you see wh
165.
▲
by
mraleph
13y ago
> just as they optimize for typescript code It's compiler itself that is in the Octane (though compiler itself is written in TypeScript). This particular benchmark pressures GC a lot and GC shares the top spot with a load from dicti
166.
▲
by
mraleph
13y ago
I also suggest zooming into those graphs to see which changes lead to drops (at least those that are currently visible). Then you could try to explain people what asm.js specific is in changes like: https://code.google.com/p
167.
▲
by
mraleph
13y ago
If you make changes to your site that make both IE6 and all other browsers fast, then what are you optimizing for? Because this is what is happening. asm.js is as a monolith: "use asm" in the foundation and a pyramid of typing r
168.
▲
by
mraleph
13y ago
> Instead, I'd bet the Chrome team are just watching for JS which matches the asm.js spec No. All optimizations that V8 are doing are following from the JavaScript specification itself, not from asm.js specification. V8 does not use
169.
▲
by
mraleph
13y ago
JS prototypes provide a single parent lookup delegation, which is not that different from single inheritance and is mostly used to emulate single inheritance class systems in the wild. Furthermore Dart supports mixins, so it's not ex
170.
▲
by
mraleph
13y ago
You don't have to emulate functions in Dart. Dart has first class closures: adder(x) => (y) => x + y; You can also make you objects act like functions, i.e. be callable via obj(...). Which is a completely different thing (and y
171.
▲
by
mraleph
13y ago
Strictly speaking it's not a doc. It's a snippet on the main page that tries to show case available language constructs. I do agree however that wrapping Fibonacci in a class looks a bit strange. Documentation that showcases featu
172.
▲
by
mraleph
13y ago
If you mean type annotations then no, right now Dart VM does not use type annotations to optimize things. Dart VM features an classical adaptive optimizations pipeline that first gathers type information from the run and then optimizes ho
173.
▲
by
mraleph
13y ago
Fibonacci function in Dart can be as easy as: fib(n) => n < 2 ? n : (fib(n - 1) + fib(n - 2)); Examples on the main page just exists to show cases as much language features as possible. It does not say that you have to wrap your Fib
174.
▲
by
mraleph
13y ago
> All runtimes but MSIE (unless they've added it in IE11) already implement `const`, and it's standardized in ES6. const implemented currently is very weird thing. It's more or less a read only variable, which silently ign
175.
▲
by
mraleph
13y ago
> No one will take the time to look at it. No, I think you are making a wrong assumption here. A bug report like that, that pinpoints a line in question and provides observable metrics is the best kind of performance issue that you can f
176.
▲
by
mraleph
13y ago
Answer is simple: you are adding more and more listeners as jsPerf runs your test case. One of the most important things to remember while using jsPerf is that setup phase can and will be executed multiple times. As the result the list of l
177.
▲
by
mraleph
13y ago
Have you consider reporting strange deoptimization behaviour to V8 team? Performance issues are better investigated than worked around. V8 has special support for uint32 values in optimized frames to avoid converting them to doubles when th
178.
▲
by
mraleph
13y ago
I think what happened here is that Cr-Content-JavaScript is the wrong/outdated label, so V8 team was not automatically CCed. It should be Cr-Blink-JavaScript these days. I have pinged relevant people.
179.
▲
by
mraleph
13y ago
> The apply/call thing is from an old email thread with you, so I must have misunderstood. My understanding still led to performance improvements though, so that's quite mysterious :) Ah, I remembered the thread. If I am not mi
180.
▲
by
mraleph
13y ago
> In practice when it's big enough to demonstrate with a test case, the reports look like this: I would like to note that unfortunately there does not seem to be a single V8 person on that bug. I highly recommend filing all JavaScri
More ›