Delphi ChromiumEmbedded

The ChromiumEmbedded project just released r231 and DelphiChromiumEmbedded has been updated by Henri Gourvest almost immediately (!), and you can grab the code directly from the SVN.

In this post 2 days ago, I was remarking that Chrome 11 was now even faster than FireFox4, well, it appears that further progress has been made in the WebKit and V8 engine source CEF is based one, as CEF r231 runs the Mandelbrot benchmark another 20% faster than Chrome 11, meaning that JavaScript can now handle that floating point computation almost 3 times faster than vanilla Delphi XE code (not using TCanvas, which would make Delphi look horribly worse).

FWIW you can find in the DWS SVN the first very early prototype of a DWScript to JavaScript CodeGen, whose ultimate goal is to allow running Object Pascal code in a JavaScript environment. More on that sub-project in the next weeks/months as things unfold.

Delphi for JavaScript

A while back, I posted of FireFox 4 JavaScript engine running around Delphi when it came to floating point performance on the Mandebrot set, since then, Chrome got updated to version 11, and further raised the bar by beating FireFox by about 20% in that benchmark. That’s no mean feat: current generation JavaScript engines run not just faster than Delphi, but also .Net and a slew of other compilers, native or not, when it comes to floating point. Only state of the art native compiler still resist.

The figures for Delphi 64 are still unknown, but it’ll face a challenge merely matching the floating point performance of JavaScript, and if the VCL’s TCanvas hasn’t been revamped from the ground up, chances are that out of the box, Delphi 64 won’t be able to beat the HTML5 Canvas on performance (not to mention in features, where HTML5 Canvas is also leading by a few miles).

(more…)

SynEdit DWS Highlighter, Unicode Identifiers, Type refactorings

Here is a summary of recent changes for DWScript SVN-side:

  • A syntax highlighter for SynEdit (Unicode version, available in SynEdit’s SVN) is now available, it introduces support for DWSScript specific features (keywords, string delimiters…). It is essentially a fork of the Pascal syntax highlighter.
  • Unicode identifiers are now supported, though as always with Unicode identifiers, it may not be too wise to use them too much if you want to keep the scripts maintainable. It allows to access exposed classes or libraries that use Unicode identifiers themselves.
  • The type system refactoring is in progress, most of the changes are purely internal, a handful of corner-case bugs were spotted and fixed in the process.
  • Compiler will now hint about variables that are never written to (when coSymbolDictionary option is set).
  • Inc/Dec/Succ/Pred are now magic functions, and will return the correct type when invoked on an enumeration.