Asm.js optimizations lazarus / 76-Pas2JS ---------------------------------------------------------------------- lainz · 2019-04-13 19:19 Asm.js https://en.wikipedia.org/wiki/Asm.js Is the pas2js output javascript code optimized like is described in that wiki article, for example: Code: C  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i int f(int i) {  return i + 1;} That in Pascal is something like: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function f(i: integer): integer;begin  Result := i + 1;end; And translated to Asm.js Code: Javascript  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function f(i) {  i = i|0;  return (i + 1)|0;} The extra "|0" converts the variables to int32 acording to the article, so it doesn't use floating point math. ---------------------------------------------------------------------- mattias · 2019-04-13 20:08 No, but it would be possible to add an option to do so. I did not take a look what other conversions are needed, so I can't estimate how much work it is. ---------------------------------------------------------------------- lainz · 2019-04-13 21:43 Hi thanks for the quick response. Ok it will be great and another reason to choose pas2js instead of emscriptem.