HNHacker News
TopNewBestAskShowJobs

xxgreg

258 karma · joined September 9, 2011

submissionscomments
xxgreg··on Dart Is Not the Language You Think It Is
@ChuckMcM

The DartVM uses a method JIT which compiles the source code directly to machine code. An interpreter has a main loop which runs instructions one at a time.

Wikipedia is a good place to start if you'd like to understand the difference.

http://en.wikipedia.org/wiki/Just-in-time_compilation http://en.wikipedia.org/wiki/Interpreter_(computing)

xxgreg··on Dart vs Java – the DeltaBlue Benchmark
I had a quick look at this. It appears the DartVM is now beating the JVM even at 100,000 iterations (Previously Java edged out Dart at higher iterations).

100,000 iterations takes ~45 seconds to run on my computer.

At a lower number of iterations the DartVM beats the JVM by a significant margin.

The benchmark is easy to run (On linux, maybe macos too). Just check it out, make sure dart, java and gcc are in your path, and execute run.sh.

Note, this code doesn't use the benchmark harness because I wanted to include the warm up time in the measurements. At a high number of iterations this doesn't make much difference.

xxgreg··on Jsig - precise & concise javascript signature notation
If adding signatures to a codebase, why not use the closure syntax? Because then you also get a compiler which gives you nice warnings as well as better minification.
xxgreg··on Blink: A rendering engine for the Chromium project
These bits from the docs are really interesting. Can anyone here explain them in more detail? (I've also posted them as questions in moderator)

"we’d like to explore even larger ideas like moving the entire Document Object Model (DOM) into JavaScript. This has the potential to make JavaScript DOM access dramatically faster"

"Removing obscure parts of the DOM and make backwards incompatible changes to obscure parts of the DOM that benefit performance or remove complexity."

xxgreg··on Why dart2js produces faster JavaScript code from Dart
You can already build Dart for Android, but it's x86 only. There is ongoing work to implement ARM (and MIPS?).

Seems sensible for google to have some options similar to Java for both Android, and their in-house server-side code. (Oracle anyone?)

xxgreg··on Why dart2js produces faster JavaScript code from Dart
On the Richards benchmark it's 1.9x. After 2 years this is pretty impressive.

Due the nature of the Dart language the DartVM will make a number of optimizations possible that are not even possible in V8. So it will be a better platform for continued performance improvements. Time will tell...

To be honest, even if it was only doing 0.5x, I'd still use it because the tooling makes me more productive.

http://www.dartlang.org/performance/

xxgreg··on Why dart2js produces faster JavaScript code from Dart
When using dart2js, you can split a program into multiple chunks, and load them separately[1]. But you need to set this up before compiling, so that's not useful for sharing a library on a CDN.

I think people often use javascript libs on a CDN because they don't want to go to the hassle of setting up a javascript package management system, or figure out which file to download and where to put it. It's not all about load time savings.

Dart's minification, combined with pub, the package management system, make the CDN usecase irrelevant for dart IMHO. A business can just ship their library on pub, and it's easy for people to use because of Dart's out-of-the-box tools.

[1] http://api.dartlang.org/docs/releases/latest/dart_async/Defe...

xxgreg··on We are Switching to Dart
The DartVM has supported for typed arrays too, so it probably wouldn't be much work to hack emscripten to generate Dart source code.

It would be very interesting to see a benchmark of emscripten/SomethingMonkey/asm.js vs emscripten/DartVM.

(Could also add emscripten/dart2js/V8 for giggles)

xxgreg··on Elon Musk and the Hyperloop
You can pull a 10 tonne yacht with one hand on a rope. Try pulling a 10 tonne truck...

Also according to the US Transportation Energy Book, waterbourne transport more than a order of magnitude more efficient than road freight, and about 50% more efficient than rail.

http://en.wikipedia.org/wiki/Fuel_efficiency_in_transportati...

xxgreg··on The Great German Energy Experiment
Not ~5%GDP.

"the country will spend somewhere between $125 billion and "$250 billion on infrastructure expansion and subsidies in the next eight years—between 3.5 and 7 percent of Germany's 2011 GDP"

The sentence is a bit confusing but I think they mean this:

~5% of 2011 GDP / 8 years = ~0.6% 2011GDP per year.

xxgreg··on Shocker: Power demand from US homes is falling
Californias household energy use has been flat since the 70s due to efficiency programs.
← PreviousPage 6 of 6