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

Using SIMD for enhanced performance

A lot of modern CPUs and GPUs provide Single Instruction Multiple Data (SIMD) support. Four 32-bit data values (integers or floats) can be processed in parallel with the help of 128-bit special registers. This provides a potential speedup of 400 percent for image processing, 3D graphics, audio processing, and other numeric computation algorithms. Also, machine-learning algorithms (such as for automatic speech recognition) that use a Gauss Mixture Model (GMM) benefit from SIMD.

How to do it…

Dart lets you work with this feature by using the special SIMD x types from the typed_data library. It offers the following four types:

  • Int32x4, which represents four 32-bit integer values
  • Float32x4, which represents four single-precision ...

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