O'Reilly logo

Dart: Scalable Application Development by Ivo Balbaert, Sergey Akopkokhyants, Davy Mitchell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Improving performance in numerical computations

Unlike Java and C#, who have dedicated 8, 16, 32, and 64 bit signed and unsigned integer types, and 32-bit and 64-bit floats, Dart does not have bounded integer types or 32-bit floating point number types; it only has two numeric types, int (an arbitrarily sized integer) and double (conforming to the IEEE-754 spec), and their super type num. This was done to make the language more dynamic and easier to learn and use. However, the Dart VM does a good job of inferring the range of integers, and optimizes whenever possible. Here, we provide a number of discussions and tips to give your code the highest performance possible when it involves numerical computing.

How to do it...

The VM uses three integer ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required