Profile

Cover photo
Anders Johnsen
Works at Google
Attended University of Aarhus
Lives in Stilling, Denmark
137 followers|141,251 views
AboutPostsPhotosYouTube

Stream

Anders Johnsen

Shared publicly  - 
 
 
I want to take the wrappers off Dart Pad, a browser-based Dart experience that +Luke Church and I have been working on. We like to think about it as a language playground; it can be used by new developers to have fun learning Dart, and by experienced Dart developers to quickly experiment with new ideas. Developers get live code analysis feedback and can see the code run right in their browser.

If you're on a laptop, check it out at https://dartpad.dartlang.org/. If you're on a mobile device, try https://dartpad.dartlang.org/mobile.html.

Dart Pad is in beta; feedback welcome (https://github.com/dart-lang/dart-pad/issues)! Some of our plans for future iterations include:

- improved support for sharing, via Github’s gists
- support for package: references
- merging the mobile and desktop UIs into one, material design based UI
- improved API exploration via integrated code completion and dartdoc documentation

Thanks for kicking the tires!
Dart Pad (alpha!) Samples, Bootstrap, Clock, Fibonacci, Helloworld, Helloworld Html, Solar, Spirodraw, Sunflower, WebSockets. Dart; HTML; CSS. Run. API documentation · Privacy policy.
7 comments on original post
3
Add a comment...

Anders Johnsen

Shared publicly  - 
 
Some technical information about the changes we did for Dart 1.3, to improve server-side performance:

* The HTTP stack, which is written in Dart, was reworked to take advantage of the Dart VM's generational garbage collector[1]. For example, short-lived objects are very cheap to collect, so we now allocate new buffers frequently, instead of reusing buffers.

* On Linux and Mac, we reduced the number of required system calls for asynchronous I/O, which significantly reduced I/O latency. This was accomplished by moving from a combined pull and push based I/O event model, to an entirely push based solution where the OS is responsible for emitting all I/O events.

* We profiled profiled some server-side applications and identified missing optimization opportunities in the Dart VM's optimizing compiler. The VM team also tuned the compiler (for example, inlining strategies and closure calls) for more efficient asynchronous Dart code.

* Again, by profiling some samples, we identified some elements in dart:core and dart:async, that was sub-optimal. (e.g Uri-parsing and toLowerCase).

[1] http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)#Generational_GC_.28ephemeral_GC.29
Today's release of the Dart SDK version 1.3 includes a 2x performance improvement for asynchronous Dart code combined with server-side I/O operations. This puts Dart in the same league as popular server-side runtimes and allows you to build high-performance server-side Dart VM apps.
32
21
Bob Nystrom's profile photoVítor Antão's profile photoAndrew McNamara's profile photoEva Hsieh's profile photo
 
Very cool Anders. Great to see server side Dart getting the love :-)
Add a comment...

Anders Johnsen

Shared publicly  - 
 
Dartlang's dart:io library is getting in shape :)
 
Dart VM can run on the server, and we show you how. Access files, directories, sockets, SSL, TCP, UDP, HTTP, web sockets, and more. Use Dart for command-line and server-side apps.

#dartlang  
The Dart team published new docs and samples showing how to write command-line and server-side apps with Dart. The Dart VM's dart:io library provides access to files, directories, sockets, web sockets, SSL, TCP, UDP, HTTP, an...
3
Add a comment...

Anders Johnsen

Shared publicly  - 
1
Anders Johnsen's profile photoLinda Rasmussen's profile photo
4 comments
 
Næh...
Add a comment...
Have him in circles
137 people
Mikael Jensen's profile photo
Adão Junior's profile photo
Sean Geggie's profile photo
Gustav Wibling's profile photo
Mikkel Vester's profile photo
yi ling's profile photo
William Hesse's profile photo
Anders Thorhauge Sandholm's profile photo
Kasper Lund's profile photo

Anders Johnsen

Shared publicly  - 
 
 
Shoutout to +Jakob G! Thanks to his efforts while interning in Aarhus, the 1.9 release of the Dart VM includes a port of V8’s Irregexp Engine for regular expressions making your regular expressions up to 150 times faster than before! We chose to take a different approach to integrating the Irregexp Engine: reuse Dart’s existing optimizing compiler and code-generation backend. This reuse helps reduce maintenance cost and share optimization efforts: optimizations for Dart will benefit regular expressions and vice versa.

In V8, Irregexp compiles a regular expression by parsing it and converting it into an intermediate automaton representation, which V8 then analyzes, optimizes and finally directly generates native machine code. The V8 implementation requires a native-code backend for each supported host architecture. Indeed, at the time of writing V8 has 7 distinct Irregexp backends. 

In Dart, Irregexp initially compiles a regular expression, just as in V8, by parsing, converting, analyzing and optimizing it. Finally Dart generates IR (intermediate representation) instructions. This IR is the same representation used for ordinary Dart code and so we use the existing Dart optimizing compiler to further optimize the code and generate native machine code.

The Dart implementation has been tested against the same benchmark suite as developed for V8’s Irregexp. Here, the Dart VM is within a factor of two from V8. For short-running regular expressions, such as parsing URLs, Dart is actually faster due to a very fast entry to the generated matching code. 

There are several reasons we don’t hit the same peak performance as V8 across the board. For example, Dart spends more time on compiling regular expressions because, after building the Dart IR, we further optimize the code. Also, V8’s hand-tuned machine-code backends are expertly tailored to executing regular-expression code on each individual platform. The machine code Dart produces is not as efficient because the existing optimizing compiler can’t make the same assumptions about properties of the code (such as what to hold in registers and what not to). We will be looking at these issues, and due to the single shared Dart backend, improvements become improvements to the Dart VM as a whole.

We hope you enjoy Dart's new and improved regular expressions. Look for the new implementation starting with Dart 1.9, which is now in the developer channel.
1
Add a comment...

Anders Johnsen

Shared publicly  - 
 
Dart 1.1 is out - with a greatly improved server side library!
 
New Dart 1.1 stable release is ready, featuring up to 25% faster JavaScript, new support for UDP for servers, more breakpoint locations while debugging in Dart Editor, and new docs for command-line and server apps.

Dart Editor can auto-update, or you can download the latest release from https://www.dartlang.org/tools/editor/

Thanks to all our Dartisans who tested our dev channel releases. Enjoy the new features and performance!

#dartlang
Better performance, more features, and improved tools mark the 1.1 release of Dart. Just two months after the 1.0 release, this new release delivers a set of compatible updates that makes applications easier to develop and fa...
3
Add a comment...
People
Have him in circles
137 people
Mikael Jensen's profile photo
Adão Junior's profile photo
Sean Geggie's profile photo
Gustav Wibling's profile photo
Mikkel Vester's profile photo
yi ling's profile photo
William Hesse's profile photo
Anders Thorhauge Sandholm's profile photo
Kasper Lund's profile photo
Education
  • University of Aarhus
    Computer Science, 2006 - 2011
Basic Information
Gender
Male
Birthday
December 3
Apps with Google+ Sign-in
  • Bitcoin Billionaire
Work
Employment
  • Google
    Software Engineer, 2012 - present
  • Luxion ApS
    Software Engineer, 2010 - 2011
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Stilling, Denmark
Previously
Aarhus, Denmark
Links
Contributor to