First phase of dynamic arrays refactoring completed

The first phase of dynamic arrays refactoring mentioned previously is now complete, with dedicated implementations in place for all the base types. A single interface (IScriptDynArray) is now the only common ground.

  • Memory usage is reduced to 1/3 on average, performance is improved up to 2x (without JIT)
  • Array indexes have thus been bumped from Integer to NativeInt, as arrays of more than 2 billions elements have become more practical

The current state has been frozen in Release snapshot DWScript v21.3.11 on the GitHub mirror.

(more…)

Refactoring DWScript dynamic arrays

After reaching initial stages of the x86-64 JIT, work on a long overdue enhancement of the DWScript engine has started: refactoring how dynamic arrays are implemented.

One of the goals when the 32bit JIT was introduced was to edge out the Delphi 32bits compiler, which was not too complicated as Delphi was using the FPU, so merely using SSE2 at the time was enough. But the Delphi 64bits compiler makes good use of SSE2, so the only way to edge it out would be to leverage AVX2 and vectorisation.

(more…)

Announcing cefHtmlSnapshot

A first v0.1 preview of cefHtmlSnapshot is now available at https://github.com/EricGrange/cefHtmlSnapshot.

This is a command-line utility that aims to take image (PNG, JPG) or PDF snapshots of an HTML website or file, and fill in the “void” left by the abandon of Qt webkit tools like phantomjs or wkhtml2pdf. While those old utilities still work, they do not support modern web standards, and any tidbit of ECMA6 will have them stumble.
(more…)

TurboJPEG library rocks !

Units to support the TurboJPEG library is now available in the DWScript repository, you can find the relevant files in the Libraries\GraphicsLib folder, they have been tested with Delphi 10.3 in both Win32 and Win64. The DLLs are those of the latest 2.05 version.

The TurboJPEG library (aka “libjpeg-turbo”) provides a fast implementation of the libjpeg API, but the files here target the TurboJPEG core, rather than the libjpeg compatibility layer (see its documention).
The TurboJPEG API is less rich, but quite simple to use and very convenient.

(more…)

Matrix-Vector multiplication JIT compiler

Committed to daNeuralNet a first working version of a JIT for matrix-vector multiplication that relies on the FMA instruction set (Fused Multiply and Addition).

This version generates code that is up to twice faster than the OpenBLAS for matrix sizes up to CPU cache size (100×100 to 200×200 usually), and maintains a marginal lead for larger sizes, though those are bound by memory bandwidth. The performance profile is similar on both AMD and Intel CPUs.

(more…)

SamplingProfiler 64 – test version

A test version of SamplingProfiler 64bit is available here (3.2 MB).

It has only been tested with 64bit binaries compiled by Delphi 10.3 and detailed map files. It should work with other Delphi version, (TD32 and other debug information formats have not been tested yet).

There other known issues with stack traces from DLLs, so it is rough around the edges but should be functional.