Repository navigation
Releases
J2K / Jcmp 1.2.41.0
J2K / Jcmp 1.2.41.0
A self-hosting compiler for the J2K language that writes Linux ARM64 executables directly.
1.2.41.0: a recursion that ends with a call of itself (return f(n - 1) + f(n - 2), return n * f(n - 1), return gcd(b, a % b)) makes the last call a jump (fib is as fast as C); conditions without jumps (cinc, && and || as 0 or 1) and loads moved up for the little cores (the tile map 19 % faster there).
1.2.40.0: => for a function of one expression, floats in the float registers with fmadd (particles 1.97 -> 1.34 of C), <utf8> (characters, columns, Thai marks), a faster <profile>, an ABI number between the compiler and its Library, str(x) is now stg(x) (the old name warns until 1.2.42.0), and a steadier way to measure speed.
1.2.39.0: str for String, stg(x) for text from a value, int a, b = 5; (one value for every name), a comparison kept in a variable no longer sends the function to the old path, a global bool prints true, fewer sxtw in int code, float copies between float registers, and a steadier way to measure speed (stable value and spread, docs/PERFORMANCE.md).
1.2.38.0: a crash fixed (a divisor in a loop that reads an array), the C for loop is made by the tree path (2.6 times faster in a pointer loop), -asm NAME and -mc NAME show the assembler and the machine code, the library <draw2d>.
1.2.37.0: local hides a function or a variable from the other files.
1.2.36.0: the counting loop for i = 0 < n; i++ { } (the bound is worked out once).
1.2.35.0: int arithmetic wraps at 32 bits everywhere (it was cut only at a store).
1.2.34.0: the ending .jex for programs and imports; the build bug of the compiler (buffers of 8 MB for a text of 10 MB) is fixed.
1.2.33.0: several declarations in one (int a = 1, b = 2;, also in a for head) and using Math, stdlib;.
1.2.32.0: a compare of floats and a float read from memory use the float registers directly (the particle benchmark is about 20 % faster); the repositories are now Jexcmp (this one) and Jextool (the old names are forwarded).
1.2.31.0: lambdas with fn/fnv, alloc<int n>(50) and free<n>, the line #!using asm; the result of a small-type function is cut at return; the tile-map scan is a little faster.
1.2.30.0: the types i16 and u16; fn and fnv function headers; a warning for a main without return.
1.2.29.0: loops over i % c run in rounds of c turns (the loop benchmark 267 -> 139 ms, faster than clang -O2).
1.2.28.0: constants of locals written once, folding of (x+c1)-c2, main uses more registers (tile-map scan 2.2 -> 1.7 times clang -O2).
1.2.27.0: the optimiser keeps what it knows across an if (tile-map scan 2.4 -> 2.1 times gcc -O2).
1.2.26.0: loops over a few constants (for dy in 0..3) are unrolled completely (tile-map scan 127 -> 86 ms); new game-like benchmarks.
1.2.25.0: small structs in registers (vec2/vec3 code faster), bigger inlining, bigger assembler label table.
1.2.24.0: 32-bit int locals in registers, NEON for 32-bit reductions (int arrays 5 times faster).
1.2.23.0 (breaking): int is 32 bits, i64 is 64 bits; python3 tools/int2i64.py converts a program; see docs/MIGRATION.md.
1.2.22.0: fixes a speed regression of 1.2.19-1.2.21 (arrays 609 -> 124 ms), peephole copies, bench gate.
1.2.21.0: wrapping counter for i % c (loop 759 -> 270 ms), call arity in the lifter (game 64 -> 56 ms).
1.2.20.0: fix: Channel of a struct crashed on a closed empty channel (1.2.19.0 regression); strength reduction of frame-cell element addresses.
1.2.19.0: struct locals in registers (vec3 faster than gcc -O2), channel receive zero fix.
1.2.18.0: heap-array matmul as fast as gcc -O2, lifter scratch register fix.
1.2.17.0: variable-stride strength reduction and wider array-check hoisting (groundwork, no measured speed change).
1.2.16.0: array checks hoisted out of counted loops (heap-array matmul 2.5 times faster).
1.2.15.0: unroll-and-jam for global and heap arrays (matmul -25 %), float copy folding (mandel -11 %), new learning book.
1.2.14.0 (pre-release, in development): vector fmla and a 4 x 8 register-blocked matrix kernel in <neuron> (14 GFLOPS on one thread, about 31 with four, the same as a C program with the same NEON kernel), vectorised loops over heap arrays and matrix indices, fixes for String fields in { }, sort_by<String> and String^, and many new documents (a tutorial of 154 lessons, a beginner series, ten guides, a cheat sheet). The speed gate of 1.3.0 is not passed yet: see the CHANGELOG for what is not claimed.
1.2.13.0: loops over arrays are shorter again (the null check and the load of the header of an array move before the loop, constants too: sums of arrays run about 1.8 times faster, a float update about 1.35 times, the outputs are the same), a function of your program that has the name of a newer library function (pad, fmt) is yours again, the library <ui> 0.2.0 with a modern look and a sliding pill tab bar, the libraries <font> (real text, Thai too) and <softcanvas>, and a tutorial of 89 lessons.
1.2.12.0: shorter loops over arrays (the null checks of local arrays are gone, copies and float constants are folded, dead writes are not written), the library <ui> (buttons, switches, sliders for apps), the layout functions fmt, tohex, pad for jout, a cookbook of 15 runnable programs and three more tutorial lessons. Still not as fast as C: see bench/vs_c.
1.2.11.0: jout, jin, jerr (the new names of cout, cin, cerr; jcmp migrate moves a program to them), the library <npu> (a layer on the NPU of the phone), faster pushes and small arrays.
1.2.10.0: loops over arrays use 10-25 % fewer instructions (floats go straight into floating-point registers, register-offset loads and stores, repeated null checks and header loads are dropped). It is not yet as fast as C: see bench/vs_c and the plan in docs/design/25-language-roadmap.md.
1.2.8.0: jcmp fmt (the formatter: white space only, never the meaning; -c checks, -p prints), the language roadmap and the first comparison with C and C++ in the docs.
1.2.7.0: a float variable lives in a floating-point register and float arrays are read and written with one instruction (about 25% faster loops of floats), the library neurongpu (the matrix product on the GPU), retrieve (search in your own texts), mlp (train a small network in a few lines), vulkan 0.3.0 (compute from SPIR-V), simd 0.10.0.
1.2.6.0: i8x16 and a.dot(b) (the int8 dot product, SDOT: quantised AI models run 2-3 times faster), arguments beyond the eighth are checked and converted, the libraries neuron 0.7.0 (a GPT that trains on the phone), gguf/llama (run GGUF models), websocket, the Gateway of discord, and a tutorial of 82 lessons (down to bits, a tiny CPU and ARM64 machine words).
1.2.5.0: the libraries web (HTTP client), telegram and discord (bots), neuron 0.2.0 with a matrix product 5-7 times faster, the first benchmark against C (bench/) and the plan to make loops fast.
1.2.4.0: a root like an OS (JARIC_ROOT: /etc, /home, /u for the programs made by jcmp), Sys::chdir, the library qr (reads QR codes), Env no longer crashes in a shared library (-l).
1.2.3.0: interfaces (itf / impl), #import <native> makes the program dynamic by itself (no -dyn), virtual methods fixed on ARM32, new libraries (canvas2d, glcanvas, glapp, tasks, OpenGL ES textures and instancing).
1.2.2.0: jcmp -novec (no NEON code), messages that name jc lib install, nine new game-engine libraries.
1.2.1.0: default arguments (int add(int a, int b = 10)), text with values inside ("x = {x}"), functions that return a value in raw #!library files.
1.2.0.0: inheritance (struct Dog : Animal, virtual / override), native GPU from J2K (-dyn, OpenGL ES 3.1, Vulkan), jcmp -j N (many cores) and -progress, Fs::read.*, a fix for bool fields of structs.
1.1.0.0: shared libraries (jcmp file.jk -l -o lib.so and export functions that C, Java (JNI) and Python can call), a bigger Regex (groups, |, {n,m}, lazy quantifiers, find_all / replace / split), and a fix for return of a String taken from an array.
1.0.0.0: the first stable release (see CHANGELOG.md). Programs built with jcmp may be sold and distributed freely, every update of jcmp 1.x is free, and a 1.x.x.x release keeps your programs working.
0.9.206: a bug fixed (a double in a register after a caught throw), LICENSE 1.2 (programs built with jcmp may be sold freely), the tutorial has 48 lessons.
0.9.205: a little more speed on ARM32 (immediates, shifts, multiplication by a power of two).
0.9.204: a much faster ARM32 target (registers for the most used doubles and numbers: nbody 14x to 3.5x of the ARM64 time, sha256 19x to 11x).
0.9.203: #require cpu "crc32" checks the CPU when the program starts; read knows more keys and has key_timeout, password, decimal; the tutorial has 44 lessons.
0.9.202: reg<int x19> c (a variable in a register), Cache::prefetch, Cpu::speculation_barrier, #require cpu "crc32" with Cpu::crc32 / crc32c, the read module for the keyboard, and a longer tutorial (36 lessons).
0.9.201: cout prints a bool as true / false and a pointer as 0x...; cerr; faster integer division on ARM32.
0.9.200: wide arithmetic in Bit (carry, 128-bit product, divide with remainder, saturating add) and Flags::c in register blocks.
0.9.199: #expect instructions <= N keeps the code of a function short (the compiler stops when it grows).
0.9.198: Cpu::inst instructions on ARM32, a faster ARM32 (10 to 25%).
0.9.197: jcmp -show NAME (the code of a function), NEON loops on ARM...
J2K / Jcmp 1.2.40.0
J2K / Jcmp 1.2.40.0
A self-hosting compiler for the J2K language that writes Linux ARM64 executables directly.
1.2.40.0: => for a function of one expression, floats in the float registers with fmadd (particles 1.97 -> 1.34 of C), <utf8> (characters, columns, Thai marks), a faster <profile>, an ABI number between the compiler and its Library, str(x) is now stg(x) (the old name warns until 1.2.42.0), and a steadier way to measure speed.
1.2.39.0: str for String, stg(x) for text from a value, int a, b = 5; (one value for every name), a comparison kept in a variable no longer sends the function to the old path, a global bool prints true, fewer sxtw in int code, float copies between float registers, and a steadier way to measure speed (stable value and spread, docs/PERFORMANCE.md).
1.2.38.0: a crash fixed (a divisor in a loop that reads an array), the C for loop is made by the tree path (2.6 times faster in a pointer loop), -asm NAME and -mc NAME show the assembler and the machine code, the library <draw2d>.
1.2.37.0: local hides a function or a variable from the other files.
1.2.36.0: the counting loop for i = 0 < n; i++ { } (the bound is worked out once).
1.2.35.0: int arithmetic wraps at 32 bits everywhere (it was cut only at a store).
1.2.34.0: the ending .jex for programs and imports; the build bug of the compiler (buffers of 8 MB for a text of 10 MB) is fixed.
1.2.33.0: several declarations in one (int a = 1, b = 2;, also in a for head) and using Math, stdlib;.
1.2.32.0: a compare of floats and a float read from memory use the float registers directly (the particle benchmark is about 20 % faster); the repositories are now Jexcmp (this one) and Jextool (the old names are forwarded).
1.2.31.0: lambdas with fn/fnv, alloc<int n>(50) and free<n>, the line #!using asm; the result of a small-type function is cut at return; the tile-map scan is a little faster.
1.2.30.0: the types i16 and u16; fn and fnv function headers; a warning for a main without return.
1.2.29.0: loops over i % c run in rounds of c turns (the loop benchmark 267 -> 139 ms, faster than clang -O2).
1.2.28.0: constants of locals written once, folding of (x+c1)-c2, main uses more registers (tile-map scan 2.2 -> 1.7 times clang -O2).
1.2.27.0: the optimiser keeps what it knows across an if (tile-map scan 2.4 -> 2.1 times gcc -O2).
1.2.26.0: loops over a few constants (for dy in 0..3) are unrolled completely (tile-map scan 127 -> 86 ms); new game-like benchmarks.
1.2.25.0: small structs in registers (vec2/vec3 code faster), bigger inlining, bigger assembler label table.
1.2.24.0: 32-bit int locals in registers, NEON for 32-bit reductions (int arrays 5 times faster).
1.2.23.0 (breaking): int is 32 bits, i64 is 64 bits; python3 tools/int2i64.py converts a program; see docs/MIGRATION.md.
1.2.22.0: fixes a speed regression of 1.2.19-1.2.21 (arrays 609 -> 124 ms), peephole copies, bench gate.
1.2.21.0: wrapping counter for i % c (loop 759 -> 270 ms), call arity in the lifter (game 64 -> 56 ms).
1.2.20.0: fix: Channel of a struct crashed on a closed empty channel (1.2.19.0 regression); strength reduction of frame-cell element addresses.
1.2.19.0: struct locals in registers (vec3 faster than gcc -O2), channel receive zero fix.
1.2.18.0: heap-array matmul as fast as gcc -O2, lifter scratch register fix.
1.2.17.0: variable-stride strength reduction and wider array-check hoisting (groundwork, no measured speed change).
1.2.16.0: array checks hoisted out of counted loops (heap-array matmul 2.5 times faster).
1.2.15.0: unroll-and-jam for global and heap arrays (matmul -25 %), float copy folding (mandel -11 %), new learning book.
1.2.14.0 (pre-release, in development): vector fmla and a 4 x 8 register-blocked matrix kernel in <neuron> (14 GFLOPS on one thread, about 31 with four, the same as a C program with the same NEON kernel), vectorised loops over heap arrays and matrix indices, fixes for String fields in { }, sort_by<String> and String^, and many new documents (a tutorial of 154 lessons, a beginner series, ten guides, a cheat sheet). The speed gate of 1.3.0 is not passed yet: see the CHANGELOG for what is not claimed.
1.2.13.0: loops over arrays are shorter again (the null check and the load of the header of an array move before the loop, constants too: sums of arrays run about 1.8 times faster, a float update about 1.35 times, the outputs are the same), a function of your program that has the name of a newer library function (pad, fmt) is yours again, the library <ui> 0.2.0 with a modern look and a sliding pill tab bar, the libraries <font> (real text, Thai too) and <softcanvas>, and a tutorial of 89 lessons.
1.2.12.0: shorter loops over arrays (the null checks of local arrays are gone, copies and float constants are folded, dead writes are not written), the library <ui> (buttons, switches, sliders for apps), the layout functions fmt, tohex, pad for jout, a cookbook of 15 runnable programs and three more tutorial lessons. Still not as fast as C: see bench/vs_c.
1.2.11.0: jout, jin, jerr (the new names of cout, cin, cerr; jcmp migrate moves a program to them), the library <npu> (a layer on the NPU of the phone), faster pushes and small arrays.
1.2.10.0: loops over arrays use 10-25 % fewer instructions (floats go straight into floating-point registers, register-offset loads and stores, repeated null checks and header loads are dropped). It is not yet as fast as C: see bench/vs_c and the plan in docs/design/25-language-roadmap.md.
1.2.8.0: jcmp fmt (the formatter: white space only, never the meaning; -c checks, -p prints), the language roadmap and the first comparison with C and C++ in the docs.
1.2.7.0: a float variable lives in a floating-point register and float arrays are read and written with one instruction (about 25% faster loops of floats), the library neurongpu (the matrix product on the GPU), retrieve (search in your own texts), mlp (train a small network in a few lines), vulkan 0.3.0 (compute from SPIR-V), simd 0.10.0.
1.2.6.0: i8x16 and a.dot(b) (the int8 dot product, SDOT: quantised AI models run 2-3 times faster), arguments beyond the eighth are checked and converted, the libraries neuron 0.7.0 (a GPT that trains on the phone), gguf/llama (run GGUF models), websocket, the Gateway of discord, and a tutorial of 82 lessons (down to bits, a tiny CPU and ARM64 machine words).
1.2.5.0: the libraries web (HTTP client), telegram and discord (bots), neuron 0.2.0 with a matrix product 5-7 times faster, the first benchmark against C (bench/) and the plan to make loops fast.
1.2.4.0: a root like an OS (JARIC_ROOT: /etc, /home, /u for the programs made by jcmp), Sys::chdir, the library qr (reads QR codes), Env no longer crashes in a shared library (-l).
1.2.3.0: interfaces (itf / impl), #import <native> makes the program dynamic by itself (no -dyn), virtual methods fixed on ARM32, new libraries (canvas2d, glcanvas, glapp, tasks, OpenGL ES textures and instancing).
1.2.2.0: jcmp -novec (no NEON code), messages that name jc lib install, nine new game-engine libraries.
1.2.1.0: default arguments (int add(int a, int b = 10)), text with values inside ("x = {x}"), functions that return a value in raw #!library files.
1.2.0.0: inheritance (struct Dog : Animal, virtual / override), native GPU from J2K (-dyn, OpenGL ES 3.1, Vulkan), jcmp -j N (many cores) and -progress, Fs::read.*, a fix for bool fields of structs.
1.1.0.0: shared libraries (jcmp file.jk -l -o lib.so and export functions that C, Java (JNI) and Python can call), a bigger Regex (groups, |, {n,m}, lazy quantifiers, find_all / replace / split), and a fix for return of a String taken from an array.
1.0.0.0: the first stable release (see CHANGELOG.md). Programs built with jcmp may be sold and distributed freely, every update of jcmp 1.x is free, and a 1.x.x.x release keeps your programs working.
0.9.206: a bug fixed (a double in a register after a caught throw), LICENSE 1.2 (programs built with jcmp may be sold freely), the tutorial has 48 lessons.
0.9.205: a little more speed on ARM32 (immediates, shifts, multiplication by a power of two).
0.9.204: a much faster ARM32 target (registers for the most used doubles and numbers: nbody 14x to 3.5x of the ARM64 time, sha256 19x to 11x).
0.9.203: #require cpu "crc32" checks the CPU when the program starts; read knows more keys and has key_timeout, password, decimal; the tutorial has 44 lessons.
0.9.202: reg<int x19> c (a variable in a register), Cache::prefetch, Cpu::speculation_barrier, #require cpu "crc32" with Cpu::crc32 / crc32c, the read module for the keyboard, and a longer tutorial (36 lessons).
0.9.201: cout prints a bool as true / false and a pointer as 0x...; cerr; faster integer division on ARM32.
0.9.200: wide arithmetic in Bit (carry, 128-bit product, divide with remainder, saturating add) and Flags::c in register blocks.
0.9.199: #expect instructions <= N keeps the code of a function short (the compiler stops when it grows).
0.9.198: Cpu::inst instructions on ARM32, a faster ARM32 (10 to 25%).
0.9.197: jcmp -show NAME (the code of a function), NEON loops on ARM32, docs/LIMITS.md and docs/API.md.
0.9.196: the CPU level on ARM32 (atomics, barriers, Cpu::, register blocks, naked functions, raw words) and a faster ARM32.
0.9.195: loops of float with literals are vectorized (widths 6x -> 1x of clang); the examples of the documents are compiled by the tests.
**...
J2K / Jcmp 1.2.39.0
J2K / Jcmp 1.2.39.0
A self-hosting compiler for the J2K language that writes Linux ARM64 executables directly.
1.2.39.0: str for String, stg(x) for text from a value, int a, b = 5; (one value for every name), a comparison kept in a variable no longer sends the function to the old path, a global bool prints true, fewer sxtw in int code, float copies between float registers, and a steadier way to measure speed (stable value and spread, docs/PERFORMANCE.md).
1.2.38.0: a crash fixed (a divisor in a loop that reads an array), the C for loop is made by the tree path (2.6 times faster in a pointer loop), -asm NAME and -mc NAME show the assembler and the machine code, the library <draw2d>.
1.2.37.0: local hides a function or a variable from the other files.
1.2.36.0: the counting loop for i = 0 < n; i++ { } (the bound is worked out once).
1.2.35.0: int arithmetic wraps at 32 bits everywhere (it was cut only at a store).
1.2.34.0: the ending .jex for programs and imports; the build bug of the compiler (buffers of 8 MB for a text of 10 MB) is fixed.
1.2.33.0: several declarations in one (int a = 1, b = 2;, also in a for head) and using Math, stdlib;.
1.2.32.0: a compare of floats and a float read from memory use the float registers directly (the particle benchmark is about 20 % faster); the repositories are now Jexcmp (this one) and Jextool (the old names are forwarded).
1.2.31.0: lambdas with fn/fnv, alloc<int n>(50) and free<n>, the line #!using asm; the result of a small-type function is cut at return; the tile-map scan is a little faster.
1.2.30.0: the types i16 and u16; fn and fnv function headers; a warning for a main without return.
1.2.29.0: loops over i % c run in rounds of c turns (the loop benchmark 267 -> 139 ms, faster than clang -O2).
1.2.28.0: constants of locals written once, folding of (x+c1)-c2, main uses more registers (tile-map scan 2.2 -> 1.7 times clang -O2).
1.2.27.0: the optimiser keeps what it knows across an if (tile-map scan 2.4 -> 2.1 times gcc -O2).
1.2.26.0: loops over a few constants (for dy in 0..3) are unrolled completely (tile-map scan 127 -> 86 ms); new game-like benchmarks.
1.2.25.0: small structs in registers (vec2/vec3 code faster), bigger inlining, bigger assembler label table.
1.2.24.0: 32-bit int locals in registers, NEON for 32-bit reductions (int arrays 5 times faster).
1.2.23.0 (breaking): int is 32 bits, i64 is 64 bits; python3 tools/int2i64.py converts a program; see docs/MIGRATION.md.
1.2.22.0: fixes a speed regression of 1.2.19-1.2.21 (arrays 609 -> 124 ms), peephole copies, bench gate.
1.2.21.0: wrapping counter for i % c (loop 759 -> 270 ms), call arity in the lifter (game 64 -> 56 ms).
1.2.20.0: fix: Channel of a struct crashed on a closed empty channel (1.2.19.0 regression); strength reduction of frame-cell element addresses.
1.2.19.0: struct locals in registers (vec3 faster than gcc -O2), channel receive zero fix.
1.2.18.0: heap-array matmul as fast as gcc -O2, lifter scratch register fix.
1.2.17.0: variable-stride strength reduction and wider array-check hoisting (groundwork, no measured speed change).
1.2.16.0: array checks hoisted out of counted loops (heap-array matmul 2.5 times faster).
1.2.15.0: unroll-and-jam for global and heap arrays (matmul -25 %), float copy folding (mandel -11 %), new learning book.
1.2.14.0 (pre-release, in development): vector fmla and a 4 x 8 register-blocked matrix kernel in <neuron> (14 GFLOPS on one thread, about 31 with four, the same as a C program with the same NEON kernel), vectorised loops over heap arrays and matrix indices, fixes for String fields in { }, sort_by<String> and String^, and many new documents (a tutorial of 154 lessons, a beginner series, ten guides, a cheat sheet). The speed gate of 1.3.0 is not passed yet: see the CHANGELOG for what is not claimed.
1.2.13.0: loops over arrays are shorter again (the null check and the load of the header of an array move before the loop, constants too: sums of arrays run about 1.8 times faster, a float update about 1.35 times, the outputs are the same), a function of your program that has the name of a newer library function (pad, fmt) is yours again, the library <ui> 0.2.0 with a modern look and a sliding pill tab bar, the libraries <font> (real text, Thai too) and <softcanvas>, and a tutorial of 89 lessons.
1.2.12.0: shorter loops over arrays (the null checks of local arrays are gone, copies and float constants are folded, dead writes are not written), the library <ui> (buttons, switches, sliders for apps), the layout functions fmt, tohex, pad for jout, a cookbook of 15 runnable programs and three more tutorial lessons. Still not as fast as C: see bench/vs_c.
1.2.11.0: jout, jin, jerr (the new names of cout, cin, cerr; jcmp migrate moves a program to them), the library <npu> (a layer on the NPU of the phone), faster pushes and small arrays.
1.2.10.0: loops over arrays use 10-25 % fewer instructions (floats go straight into floating-point registers, register-offset loads and stores, repeated null checks and header loads are dropped). It is not yet as fast as C: see bench/vs_c and the plan in docs/design/25-language-roadmap.md.
1.2.8.0: jcmp fmt (the formatter: white space only, never the meaning; -c checks, -p prints), the language roadmap and the first comparison with C and C++ in the docs.
1.2.7.0: a float variable lives in a floating-point register and float arrays are read and written with one instruction (about 25% faster loops of floats), the library neurongpu (the matrix product on the GPU), retrieve (search in your own texts), mlp (train a small network in a few lines), vulkan 0.3.0 (compute from SPIR-V), simd 0.10.0.
1.2.6.0: i8x16 and a.dot(b) (the int8 dot product, SDOT: quantised AI models run 2-3 times faster), arguments beyond the eighth are checked and converted, the libraries neuron 0.7.0 (a GPT that trains on the phone), gguf/llama (run GGUF models), websocket, the Gateway of discord, and a tutorial of 82 lessons (down to bits, a tiny CPU and ARM64 machine words).
1.2.5.0: the libraries web (HTTP client), telegram and discord (bots), neuron 0.2.0 with a matrix product 5-7 times faster, the first benchmark against C (bench/) and the plan to make loops fast.
1.2.4.0: a root like an OS (JARIC_ROOT: /etc, /home, /u for the programs made by jcmp), Sys::chdir, the library qr (reads QR codes), Env no longer crashes in a shared library (-l).
1.2.3.0: interfaces (itf / impl), #import <native> makes the program dynamic by itself (no -dyn), virtual methods fixed on ARM32, new libraries (canvas2d, glcanvas, glapp, tasks, OpenGL ES textures and instancing).
1.2.2.0: jcmp -novec (no NEON code), messages that name jc lib install, nine new game-engine libraries.
1.2.1.0: default arguments (int add(int a, int b = 10)), text with values inside ("x = {x}"), functions that return a value in raw #!library files.
1.2.0.0: inheritance (struct Dog : Animal, virtual / override), native GPU from J2K (-dyn, OpenGL ES 3.1, Vulkan), jcmp -j N (many cores) and -progress, Fs::read.*, a fix for bool fields of structs.
1.1.0.0: shared libraries (jcmp file.jk -l -o lib.so and export functions that C, Java (JNI) and Python can call), a bigger Regex (groups, |, {n,m}, lazy quantifiers, find_all / replace / split), and a fix for return of a String taken from an array.
1.0.0.0: the first stable release (see CHANGELOG.md). Programs built with jcmp may be sold and distributed freely, every update of jcmp 1.x is free, and a 1.x.x.x release keeps your programs working.
0.9.206: a bug fixed (a double in a register after a caught throw), LICENSE 1.2 (programs built with jcmp may be sold freely), the tutorial has 48 lessons.
0.9.205: a little more speed on ARM32 (immediates, shifts, multiplication by a power of two).
0.9.204: a much faster ARM32 target (registers for the most used doubles and numbers: nbody 14x to 3.5x of the ARM64 time, sha256 19x to 11x).
0.9.203: #require cpu "crc32" checks the CPU when the program starts; read knows more keys and has key_timeout, password, decimal; the tutorial has 44 lessons.
0.9.202: reg<int x19> c (a variable in a register), Cache::prefetch, Cpu::speculation_barrier, #require cpu "crc32" with Cpu::crc32 / crc32c, the read module for the keyboard, and a longer tutorial (36 lessons).
0.9.201: cout prints a bool as true / false and a pointer as 0x...; cerr; faster integer division on ARM32.
0.9.200: wide arithmetic in Bit (carry, 128-bit product, divide with remainder, saturating add) and Flags::c in register blocks.
0.9.199: #expect instructions <= N keeps the code of a function short (the compiler stops when it grows).
0.9.198: Cpu::inst instructions on ARM32, a faster ARM32 (10 to 25%).
0.9.197: jcmp -show NAME (the code of a function), NEON loops on ARM32, docs/LIMITS.md and docs/API.md.
0.9.196: the CPU level on ARM32 (atomics, barriers, Cpu::, register blocks, naked functions, raw words) and a faster ARM32.
0.9.195: loops of float with literals are vectorized (widths 6x -> 1x of clang); the examples of the documents are compiled by the tests.
0.9.194: the compiler runs as an ARM32 program and compiles itself there (the same result, byte for byte).
0.9.193: ARM32: SIMD vectors, #multithread loops (214 of 230 tests run the same as on ARM64).
0.9.192: ARM32: defer, expr? with a text or array content, unsigned to double (205 of 230 tests run the same as on ARM64).
...
J2K / Jcmp 1.2.38.0
J2K / Jcmp 1.2.38.0
A self-hosting compiler for the J2K language that writes Linux ARM64 executables directly.
1.2.38.0: a crash fixed (a divisor in a loop that reads an array), the C for loop is made by the tree path (2.6 times faster in a pointer loop), -asm NAME and -mc NAME show the assembler and the machine code, the library <draw2d>.
1.2.37.0: local hides a function or a variable from the other files.
1.2.36.0: the counting loop for i = 0 < n; i++ { } (the bound is worked out once).
1.2.35.0: int arithmetic wraps at 32 bits everywhere (it was cut only at a store).
1.2.34.0: the ending .jex for programs and imports; the build bug of the compiler (buffers of 8 MB for a text of 10 MB) is fixed.
1.2.33.0: several declarations in one (int a = 1, b = 2;, also in a for head) and using Math, stdlib;.
1.2.32.0: a compare of floats and a float read from memory use the float registers directly (the particle benchmark is about 20 % faster); the repositories are now Jexcmp (this one) and Jextool (the old names are forwarded).
1.2.31.0: lambdas with fn/fnv, alloc<int n>(50) and free<n>, the line #!using asm; the result of a small-type function is cut at return; the tile-map scan is a little faster.
1.2.30.0: the types i16 and u16; fn and fnv function headers; a warning for a main without return.
1.2.29.0: loops over i % c run in rounds of c turns (the loop benchmark 267 -> 139 ms, faster than clang -O2).
1.2.28.0: constants of locals written once, folding of (x+c1)-c2, main uses more registers (tile-map scan 2.2 -> 1.7 times clang -O2).
1.2.27.0: the optimiser keeps what it knows across an if (tile-map scan 2.4 -> 2.1 times gcc -O2).
1.2.26.0: loops over a few constants (for dy in 0..3) are unrolled completely (tile-map scan 127 -> 86 ms); new game-like benchmarks.
1.2.25.0: small structs in registers (vec2/vec3 code faster), bigger inlining, bigger assembler label table.
1.2.24.0: 32-bit int locals in registers, NEON for 32-bit reductions (int arrays 5 times faster).
1.2.23.0 (breaking): int is 32 bits, i64 is 64 bits; python3 tools/int2i64.py converts a program; see docs/MIGRATION.md.
1.2.22.0: fixes a speed regression of 1.2.19-1.2.21 (arrays 609 -> 124 ms), peephole copies, bench gate.
1.2.21.0: wrapping counter for i % c (loop 759 -> 270 ms), call arity in the lifter (game 64 -> 56 ms).
1.2.20.0: fix: Channel of a struct crashed on a closed empty channel (1.2.19.0 regression); strength reduction of frame-cell element addresses.
1.2.19.0: struct locals in registers (vec3 faster than gcc -O2), channel receive zero fix.
1.2.18.0: heap-array matmul as fast as gcc -O2, lifter scratch register fix.
1.2.17.0: variable-stride strength reduction and wider array-check hoisting (groundwork, no measured speed change).
1.2.16.0: array checks hoisted out of counted loops (heap-array matmul 2.5 times faster).
1.2.15.0: unroll-and-jam for global and heap arrays (matmul -25 %), float copy folding (mandel -11 %), new learning book.
1.2.14.0 (pre-release, in development): vector fmla and a 4 x 8 register-blocked matrix kernel in <neuron> (14 GFLOPS on one thread, about 31 with four, the same as a C program with the same NEON kernel), vectorised loops over heap arrays and matrix indices, fixes for String fields in { }, sort_by<String> and String^, and many new documents (a tutorial of 154 lessons, a beginner series, ten guides, a cheat sheet). The speed gate of 1.3.0 is not passed yet: see the CHANGELOG for what is not claimed.
1.2.13.0: loops over arrays are shorter again (the null check and the load of the header of an array move before the loop, constants too: sums of arrays run about 1.8 times faster, a float update about 1.35 times, the outputs are the same), a function of your program that has the name of a newer library function (pad, fmt) is yours again, the library <ui> 0.2.0 with a modern look and a sliding pill tab bar, the libraries <font> (real text, Thai too) and <softcanvas>, and a tutorial of 89 lessons.
1.2.12.0: shorter loops over arrays (the null checks of local arrays are gone, copies and float constants are folded, dead writes are not written), the library <ui> (buttons, switches, sliders for apps), the layout functions fmt, tohex, pad for jout, a cookbook of 15 runnable programs and three more tutorial lessons. Still not as fast as C: see bench/vs_c.
1.2.11.0: jout, jin, jerr (the new names of cout, cin, cerr; jcmp migrate moves a program to them), the library <npu> (a layer on the NPU of the phone), faster pushes and small arrays.
1.2.10.0: loops over arrays use 10-25 % fewer instructions (floats go straight into floating-point registers, register-offset loads and stores, repeated null checks and header loads are dropped). It is not yet as fast as C: see bench/vs_c and the plan in docs/design/25-language-roadmap.md.
1.2.8.0: jcmp fmt (the formatter: white space only, never the meaning; -c checks, -p prints), the language roadmap and the first comparison with C and C++ in the docs.
1.2.7.0: a float variable lives in a floating-point register and float arrays are read and written with one instruction (about 25% faster loops of floats), the library neurongpu (the matrix product on the GPU), retrieve (search in your own texts), mlp (train a small network in a few lines), vulkan 0.3.0 (compute from SPIR-V), simd 0.10.0.
1.2.6.0: i8x16 and a.dot(b) (the int8 dot product, SDOT: quantised AI models run 2-3 times faster), arguments beyond the eighth are checked and converted, the libraries neuron 0.7.0 (a GPT that trains on the phone), gguf/llama (run GGUF models), websocket, the Gateway of discord, and a tutorial of 82 lessons (down to bits, a tiny CPU and ARM64 machine words).
1.2.5.0: the libraries web (HTTP client), telegram and discord (bots), neuron 0.2.0 with a matrix product 5-7 times faster, the first benchmark against C (bench/) and the plan to make loops fast.
1.2.4.0: a root like an OS (JARIC_ROOT: /etc, /home, /u for the programs made by jcmp), Sys::chdir, the library qr (reads QR codes), Env no longer crashes in a shared library (-l).
1.2.3.0: interfaces (itf / impl), #import <native> makes the program dynamic by itself (no -dyn), virtual methods fixed on ARM32, new libraries (canvas2d, glcanvas, glapp, tasks, OpenGL ES textures and instancing).
1.2.2.0: jcmp -novec (no NEON code), messages that name jc lib install, nine new game-engine libraries.
1.2.1.0: default arguments (int add(int a, int b = 10)), text with values inside ("x = {x}"), functions that return a value in raw #!library files.
1.2.0.0: inheritance (struct Dog : Animal, virtual / override), native GPU from J2K (-dyn, OpenGL ES 3.1, Vulkan), jcmp -j N (many cores) and -progress, Fs::read.*, a fix for bool fields of structs.
1.1.0.0: shared libraries (jcmp file.jk -l -o lib.so and export functions that C, Java (JNI) and Python can call), a bigger Regex (groups, |, {n,m}, lazy quantifiers, find_all / replace / split), and a fix for return of a String taken from an array.
1.0.0.0: the first stable release (see CHANGELOG.md). Programs built with jcmp may be sold and distributed freely, every update of jcmp 1.x is free, and a 1.x.x.x release keeps your programs working.
0.9.206: a bug fixed (a double in a register after a caught throw), LICENSE 1.2 (programs built with jcmp may be sold freely), the tutorial has 48 lessons.
0.9.205: a little more speed on ARM32 (immediates, shifts, multiplication by a power of two).
0.9.204: a much faster ARM32 target (registers for the most used doubles and numbers: nbody 14x to 3.5x of the ARM64 time, sha256 19x to 11x).
0.9.203: #require cpu "crc32" checks the CPU when the program starts; read knows more keys and has key_timeout, password, decimal; the tutorial has 44 lessons.
0.9.202: reg<int x19> c (a variable in a register), Cache::prefetch, Cpu::speculation_barrier, #require cpu "crc32" with Cpu::crc32 / crc32c, the read module for the keyboard, and a longer tutorial (36 lessons).
0.9.201: cout prints a bool as true / false and a pointer as 0x...; cerr; faster integer division on ARM32.
0.9.200: wide arithmetic in Bit (carry, 128-bit product, divide with remainder, saturating add) and Flags::c in register blocks.
0.9.199: #expect instructions <= N keeps the code of a function short (the compiler stops when it grows).
0.9.198: Cpu::inst instructions on ARM32, a faster ARM32 (10 to 25%).
0.9.197: jcmp -show NAME (the code of a function), NEON loops on ARM32, docs/LIMITS.md and docs/API.md.
0.9.196: the CPU level on ARM32 (atomics, barriers, Cpu::, register blocks, naked functions, raw words) and a faster ARM32.
0.9.195: loops of float with literals are vectorized (widths 6x -> 1x of clang); the examples of the documents are compiled by the tests.
0.9.194: the compiler runs as an ARM32 program and compiles itself there (the same result, byte for byte).
0.9.193: ARM32: SIMD vectors, #multithread loops (214 of 230 tests run the same as on ARM64).
0.9.192: ARM32: defer, expr? with a text or array content, unsigned to double (205 of 230 tests run the same as on ARM64).
0.9.191: ARM32: sleep, the clock and processes work (system calls adapted to the 32-bit structures); expr? made from the syntax tree.
0.9.190: ARM32: jcmp -target arm32 writes 32-bit ARM programs (most of the tests run the same as on ARM64); the syntax tree makes 95% of the code.
0.9.189: the syntax tree builds more functions (methods on a text, `S...
J2K / Jcmp 1.2.37.0
J2K / Jcmp 1.2.37.0
A self-hosting compiler for the J2K language that writes Linux ARM64 executables directly.
1.2.37.0: local hides a function or a variable from the other files.
1.2.36.0: the counting loop for i = 0 < n; i++ { } (the bound is worked out once).
1.2.35.0: int arithmetic wraps at 32 bits everywhere (it was cut only at a store).
1.2.34.0: the ending .jex for programs and imports; the build bug of the compiler (buffers of 8 MB for a text of 10 MB) is fixed.
1.2.33.0: several declarations in one (int a = 1, b = 2;, also in a for head) and using Math, stdlib;.
1.2.32.0: a compare of floats and a float read from memory use the float registers directly (the particle benchmark is about 20 % faster); the repositories are now Jexcmp (this one) and Jextool (the old names are forwarded).
1.2.31.0: lambdas with fn/fnv, alloc<int n>(50) and free<n>, the line #!using asm; the result of a small-type function is cut at return; the tile-map scan is a little faster.
1.2.30.0: the types i16 and u16; fn and fnv function headers; a warning for a main without return.
1.2.29.0: loops over i % c run in rounds of c turns (the loop benchmark 267 -> 139 ms, faster than clang -O2).
1.2.28.0: constants of locals written once, folding of (x+c1)-c2, main uses more registers (tile-map scan 2.2 -> 1.7 times clang -O2).
1.2.27.0: the optimiser keeps what it knows across an if (tile-map scan 2.4 -> 2.1 times gcc -O2).
1.2.26.0: loops over a few constants (for dy in 0..3) are unrolled completely (tile-map scan 127 -> 86 ms); new game-like benchmarks.
1.2.25.0: small structs in registers (vec2/vec3 code faster), bigger inlining, bigger assembler label table.
1.2.24.0: 32-bit int locals in registers, NEON for 32-bit reductions (int arrays 5 times faster).
1.2.23.0 (breaking): int is 32 bits, i64 is 64 bits; python3 tools/int2i64.py converts a program; see docs/MIGRATION.md.
1.2.22.0: fixes a speed regression of 1.2.19-1.2.21 (arrays 609 -> 124 ms), peephole copies, bench gate.
1.2.21.0: wrapping counter for i % c (loop 759 -> 270 ms), call arity in the lifter (game 64 -> 56 ms).
1.2.20.0: fix: Channel of a struct crashed on a closed empty channel (1.2.19.0 regression); strength reduction of frame-cell element addresses.
1.2.19.0: struct locals in registers (vec3 faster than gcc -O2), channel receive zero fix.
1.2.18.0: heap-array matmul as fast as gcc -O2, lifter scratch register fix.
1.2.17.0: variable-stride strength reduction and wider array-check hoisting (groundwork, no measured speed change).
1.2.16.0: array checks hoisted out of counted loops (heap-array matmul 2.5 times faster).
1.2.15.0: unroll-and-jam for global and heap arrays (matmul -25 %), float copy folding (mandel -11 %), new learning book.
1.2.14.0 (pre-release, in development): vector fmla and a 4 x 8 register-blocked matrix kernel in <neuron> (14 GFLOPS on one thread, about 31 with four, the same as a C program with the same NEON kernel), vectorised loops over heap arrays and matrix indices, fixes for String fields in { }, sort_by<String> and String^, and many new documents (a tutorial of 154 lessons, a beginner series, ten guides, a cheat sheet). The speed gate of 1.3.0 is not passed yet: see the CHANGELOG for what is not claimed.
1.2.13.0: loops over arrays are shorter again (the null check and the load of the header of an array move before the loop, constants too: sums of arrays run about 1.8 times faster, a float update about 1.35 times, the outputs are the same), a function of your program that has the name of a newer library function (pad, fmt) is yours again, the library <ui> 0.2.0 with a modern look and a sliding pill tab bar, the libraries <font> (real text, Thai too) and <softcanvas>, and a tutorial of 89 lessons.
1.2.12.0: shorter loops over arrays (the null checks of local arrays are gone, copies and float constants are folded, dead writes are not written), the library <ui> (buttons, switches, sliders for apps), the layout functions fmt, tohex, pad for jout, a cookbook of 15 runnable programs and three more tutorial lessons. Still not as fast as C: see bench/vs_c.
1.2.11.0: jout, jin, jerr (the new names of cout, cin, cerr; jcmp migrate moves a program to them), the library <npu> (a layer on the NPU of the phone), faster pushes and small arrays.
1.2.10.0: loops over arrays use 10-25 % fewer instructions (floats go straight into floating-point registers, register-offset loads and stores, repeated null checks and header loads are dropped). It is not yet as fast as C: see bench/vs_c and the plan in docs/design/25-language-roadmap.md.
1.2.8.0: jcmp fmt (the formatter: white space only, never the meaning; -c checks, -p prints), the language roadmap and the first comparison with C and C++ in the docs.
1.2.7.0: a float variable lives in a floating-point register and float arrays are read and written with one instruction (about 25% faster loops of floats), the library neurongpu (the matrix product on the GPU), retrieve (search in your own texts), mlp (train a small network in a few lines), vulkan 0.3.0 (compute from SPIR-V), simd 0.10.0.
1.2.6.0: i8x16 and a.dot(b) (the int8 dot product, SDOT: quantised AI models run 2-3 times faster), arguments beyond the eighth are checked and converted, the libraries neuron 0.7.0 (a GPT that trains on the phone), gguf/llama (run GGUF models), websocket, the Gateway of discord, and a tutorial of 82 lessons (down to bits, a tiny CPU and ARM64 machine words).
1.2.5.0: the libraries web (HTTP client), telegram and discord (bots), neuron 0.2.0 with a matrix product 5-7 times faster, the first benchmark against C (bench/) and the plan to make loops fast.
1.2.4.0: a root like an OS (JARIC_ROOT: /etc, /home, /u for the programs made by jcmp), Sys::chdir, the library qr (reads QR codes), Env no longer crashes in a shared library (-l).
1.2.3.0: interfaces (itf / impl), #import <native> makes the program dynamic by itself (no -dyn), virtual methods fixed on ARM32, new libraries (canvas2d, glcanvas, glapp, tasks, OpenGL ES textures and instancing).
1.2.2.0: jcmp -novec (no NEON code), messages that name jc lib install, nine new game-engine libraries.
1.2.1.0: default arguments (int add(int a, int b = 10)), text with values inside ("x = {x}"), functions that return a value in raw #!library files.
1.2.0.0: inheritance (struct Dog : Animal, virtual / override), native GPU from J2K (-dyn, OpenGL ES 3.1, Vulkan), jcmp -j N (many cores) and -progress, Fs::read.*, a fix for bool fields of structs.
1.1.0.0: shared libraries (jcmp file.jk -l -o lib.so and export functions that C, Java (JNI) and Python can call), a bigger Regex (groups, |, {n,m}, lazy quantifiers, find_all / replace / split), and a fix for return of a String taken from an array.
1.0.0.0: the first stable release (see CHANGELOG.md). Programs built with jcmp may be sold and distributed freely, every update of jcmp 1.x is free, and a 1.x.x.x release keeps your programs working.
0.9.206: a bug fixed (a double in a register after a caught throw), LICENSE 1.2 (programs built with jcmp may be sold freely), the tutorial has 48 lessons.
0.9.205: a little more speed on ARM32 (immediates, shifts, multiplication by a power of two).
0.9.204: a much faster ARM32 target (registers for the most used doubles and numbers: nbody 14x to 3.5x of the ARM64 time, sha256 19x to 11x).
0.9.203: #require cpu "crc32" checks the CPU when the program starts; read knows more keys and has key_timeout, password, decimal; the tutorial has 44 lessons.
0.9.202: reg<int x19> c (a variable in a register), Cache::prefetch, Cpu::speculation_barrier, #require cpu "crc32" with Cpu::crc32 / crc32c, the read module for the keyboard, and a longer tutorial (36 lessons).
0.9.201: cout prints a bool as true / false and a pointer as 0x...; cerr; faster integer division on ARM32.
0.9.200: wide arithmetic in Bit (carry, 128-bit product, divide with remainder, saturating add) and Flags::c in register blocks.
0.9.199: #expect instructions <= N keeps the code of a function short (the compiler stops when it grows).
0.9.198: Cpu::inst instructions on ARM32, a faster ARM32 (10 to 25%).
0.9.197: jcmp -show NAME (the code of a function), NEON loops on ARM32, docs/LIMITS.md and docs/API.md.
0.9.196: the CPU level on ARM32 (atomics, barriers, Cpu::, register blocks, naked functions, raw words) and a faster ARM32.
0.9.195: loops of float with literals are vectorized (widths 6x -> 1x of clang); the examples of the documents are compiled by the tests.
0.9.194: the compiler runs as an ARM32 program and compiles itself there (the same result, byte for byte).
0.9.193: ARM32: SIMD vectors, #multithread loops (214 of 230 tests run the same as on ARM64).
0.9.192: ARM32: defer, expr? with a text or array content, unsigned to double (205 of 230 tests run the same as on ARM64).
0.9.191: ARM32: sleep, the clock and processes work (system calls adapted to the 32-bit structures); expr? made from the syntax tree.
0.9.190: ARM32: jcmp -target arm32 writes 32-bit ARM programs (most of the tests run the same as on ARM64); the syntax tree makes 95% of the code.
0.9.189: the syntax tree builds more functions (methods on a text, String[] parameters, assert / exit as library functions); no change for programs.
0.9.188: the cache is on by default (~/.j2k/cache, J2K_CACHE= to turn it off); jcmp -jh FILE / -api NAME write the interface of a file or of a li...
J2K / Jcmp 1.2.36.0
J2K / Jcmp 1.2.36.0
A self-hosting compiler for the J2K language that writes Linux ARM64 executables directly.
1.2.36.0: the counting loop for i = 0 < n; i++ { } (the bound is worked out once).
1.2.35.0: int arithmetic wraps at 32 bits everywhere (it was cut only at a store).
1.2.34.0: the ending .jex for programs and imports; the build bug of the compiler (buffers of 8 MB for a text of 10 MB) is fixed.
1.2.33.0: several declarations in one (int a = 1, b = 2;, also in a for head) and using Math, stdlib;.
1.2.32.0: a compare of floats and a float read from memory use the float registers directly (the particle benchmark is about 20 % faster); the repositories are now Jexcmp (this one) and Jextool (the old names are forwarded).
1.2.31.0: lambdas with fn/fnv, alloc<int n>(50) and free<n>, the line #!using asm; the result of a small-type function is cut at return; the tile-map scan is a little faster.
1.2.30.0: the types i16 and u16; fn and fnv function headers; a warning for a main without return.
1.2.29.0: loops over i % c run in rounds of c turns (the loop benchmark 267 -> 139 ms, faster than clang -O2).
1.2.28.0: constants of locals written once, folding of (x+c1)-c2, main uses more registers (tile-map scan 2.2 -> 1.7 times clang -O2).
1.2.27.0: the optimiser keeps what it knows across an if (tile-map scan 2.4 -> 2.1 times gcc -O2).
1.2.26.0: loops over a few constants (for dy in 0..3) are unrolled completely (tile-map scan 127 -> 86 ms); new game-like benchmarks.
1.2.25.0: small structs in registers (vec2/vec3 code faster), bigger inlining, bigger assembler label table.
1.2.24.0: 32-bit int locals in registers, NEON for 32-bit reductions (int arrays 5 times faster).
1.2.23.0 (breaking): int is 32 bits, i64 is 64 bits; python3 tools/int2i64.py converts a program; see docs/MIGRATION.md.
1.2.22.0: fixes a speed regression of 1.2.19-1.2.21 (arrays 609 -> 124 ms), peephole copies, bench gate.
1.2.21.0: wrapping counter for i % c (loop 759 -> 270 ms), call arity in the lifter (game 64 -> 56 ms).
1.2.20.0: fix: Channel of a struct crashed on a closed empty channel (1.2.19.0 regression); strength reduction of frame-cell element addresses.
1.2.19.0: struct locals in registers (vec3 faster than gcc -O2), channel receive zero fix.
1.2.18.0: heap-array matmul as fast as gcc -O2, lifter scratch register fix.
1.2.17.0: variable-stride strength reduction and wider array-check hoisting (groundwork, no measured speed change).
1.2.16.0: array checks hoisted out of counted loops (heap-array matmul 2.5 times faster).
1.2.15.0: unroll-and-jam for global and heap arrays (matmul -25 %), float copy folding (mandel -11 %), new learning book.
1.2.14.0 (pre-release, in development): vector fmla and a 4 x 8 register-blocked matrix kernel in <neuron> (14 GFLOPS on one thread, about 31 with four, the same as a C program with the same NEON kernel), vectorised loops over heap arrays and matrix indices, fixes for String fields in { }, sort_by<String> and String^, and many new documents (a tutorial of 154 lessons, a beginner series, ten guides, a cheat sheet). The speed gate of 1.3.0 is not passed yet: see the CHANGELOG for what is not claimed.
1.2.13.0: loops over arrays are shorter again (the null check and the load of the header of an array move before the loop, constants too: sums of arrays run about 1.8 times faster, a float update about 1.35 times, the outputs are the same), a function of your program that has the name of a newer library function (pad, fmt) is yours again, the library <ui> 0.2.0 with a modern look and a sliding pill tab bar, the libraries <font> (real text, Thai too) and <softcanvas>, and a tutorial of 89 lessons.
1.2.12.0: shorter loops over arrays (the null checks of local arrays are gone, copies and float constants are folded, dead writes are not written), the library <ui> (buttons, switches, sliders for apps), the layout functions fmt, tohex, pad for jout, a cookbook of 15 runnable programs and three more tutorial lessons. Still not as fast as C: see bench/vs_c.
1.2.11.0: jout, jin, jerr (the new names of cout, cin, cerr; jcmp migrate moves a program to them), the library <npu> (a layer on the NPU of the phone), faster pushes and small arrays.
1.2.10.0: loops over arrays use 10-25 % fewer instructions (floats go straight into floating-point registers, register-offset loads and stores, repeated null checks and header loads are dropped). It is not yet as fast as C: see bench/vs_c and the plan in docs/design/25-language-roadmap.md.
1.2.8.0: jcmp fmt (the formatter: white space only, never the meaning; -c checks, -p prints), the language roadmap and the first comparison with C and C++ in the docs.
1.2.7.0: a float variable lives in a floating-point register and float arrays are read and written with one instruction (about 25% faster loops of floats), the library neurongpu (the matrix product on the GPU), retrieve (search in your own texts), mlp (train a small network in a few lines), vulkan 0.3.0 (compute from SPIR-V), simd 0.10.0.
1.2.6.0: i8x16 and a.dot(b) (the int8 dot product, SDOT: quantised AI models run 2-3 times faster), arguments beyond the eighth are checked and converted, the libraries neuron 0.7.0 (a GPT that trains on the phone), gguf/llama (run GGUF models), websocket, the Gateway of discord, and a tutorial of 82 lessons (down to bits, a tiny CPU and ARM64 machine words).
1.2.5.0: the libraries web (HTTP client), telegram and discord (bots), neuron 0.2.0 with a matrix product 5-7 times faster, the first benchmark against C (bench/) and the plan to make loops fast.
1.2.4.0: a root like an OS (JARIC_ROOT: /etc, /home, /u for the programs made by jcmp), Sys::chdir, the library qr (reads QR codes), Env no longer crashes in a shared library (-l).
1.2.3.0: interfaces (itf / impl), #import <native> makes the program dynamic by itself (no -dyn), virtual methods fixed on ARM32, new libraries (canvas2d, glcanvas, glapp, tasks, OpenGL ES textures and instancing).
1.2.2.0: jcmp -novec (no NEON code), messages that name jc lib install, nine new game-engine libraries.
1.2.1.0: default arguments (int add(int a, int b = 10)), text with values inside ("x = {x}"), functions that return a value in raw #!library files.
1.2.0.0: inheritance (struct Dog : Animal, virtual / override), native GPU from J2K (-dyn, OpenGL ES 3.1, Vulkan), jcmp -j N (many cores) and -progress, Fs::read.*, a fix for bool fields of structs.
1.1.0.0: shared libraries (jcmp file.jk -l -o lib.so and export functions that C, Java (JNI) and Python can call), a bigger Regex (groups, |, {n,m}, lazy quantifiers, find_all / replace / split), and a fix for return of a String taken from an array.
1.0.0.0: the first stable release (see CHANGELOG.md). Programs built with jcmp may be sold and distributed freely, every update of jcmp 1.x is free, and a 1.x.x.x release keeps your programs working.
0.9.206: a bug fixed (a double in a register after a caught throw), LICENSE 1.2 (programs built with jcmp may be sold freely), the tutorial has 48 lessons.
0.9.205: a little more speed on ARM32 (immediates, shifts, multiplication by a power of two).
0.9.204: a much faster ARM32 target (registers for the most used doubles and numbers: nbody 14x to 3.5x of the ARM64 time, sha256 19x to 11x).
0.9.203: #require cpu "crc32" checks the CPU when the program starts; read knows more keys and has key_timeout, password, decimal; the tutorial has 44 lessons.
0.9.202: reg<int x19> c (a variable in a register), Cache::prefetch, Cpu::speculation_barrier, #require cpu "crc32" with Cpu::crc32 / crc32c, the read module for the keyboard, and a longer tutorial (36 lessons).
0.9.201: cout prints a bool as true / false and a pointer as 0x...; cerr; faster integer division on ARM32.
0.9.200: wide arithmetic in Bit (carry, 128-bit product, divide with remainder, saturating add) and Flags::c in register blocks.
0.9.199: #expect instructions <= N keeps the code of a function short (the compiler stops when it grows).
0.9.198: Cpu::inst instructions on ARM32, a faster ARM32 (10 to 25%).
0.9.197: jcmp -show NAME (the code of a function), NEON loops on ARM32, docs/LIMITS.md and docs/API.md.
0.9.196: the CPU level on ARM32 (atomics, barriers, Cpu::, register blocks, naked functions, raw words) and a faster ARM32.
0.9.195: loops of float with literals are vectorized (widths 6x -> 1x of clang); the examples of the documents are compiled by the tests.
0.9.194: the compiler runs as an ARM32 program and compiles itself there (the same result, byte for byte).
0.9.193: ARM32: SIMD vectors, #multithread loops (214 of 230 tests run the same as on ARM64).
0.9.192: ARM32: defer, expr? with a text or array content, unsigned to double (205 of 230 tests run the same as on ARM64).
0.9.191: ARM32: sleep, the clock and processes work (system calls adapted to the 32-bit structures); expr? made from the syntax tree.
0.9.190: ARM32: jcmp -target arm32 writes 32-bit ARM programs (most of the tests run the same as on ARM64); the syntax tree makes 95% of the code.
0.9.189: the syntax tree builds more functions (methods on a text, String[] parameters, assert / exit as library functions); no change for programs.
0.9.188: the cache is on by default (~/.j2k/cache, J2K_CACHE= to turn it off); jcmp -jh FILE / -api NAME write the interface of a file or of a library.
0.9.187: the compiler brings the standard library, math, cpu and...
J2K / Jcmp 1.2.35.0
J2K / Jcmp 1.2.35.0
A self-hosting compiler for the J2K language that writes Linux ARM64 executables directly.
1.2.35.0: int arithmetic wraps at 32 bits everywhere (it was cut only at a store).
1.2.34.0: the ending .jex for programs and imports; the build bug of the compiler (buffers of 8 MB for a text of 10 MB) is fixed.
1.2.33.0: several declarations in one (int a = 1, b = 2;, also in a for head) and using Math, stdlib;.
1.2.32.0: a compare of floats and a float read from memory use the float registers directly (the particle benchmark is about 20 % faster); the repositories are now Jexcmp (this one) and Jextool (the old names are forwarded).
1.2.31.0: lambdas with fn/fnv, alloc<int n>(50) and free<n>, the line #!using asm; the result of a small-type function is cut at return; the tile-map scan is a little faster.
1.2.30.0: the types i16 and u16; fn and fnv function headers; a warning for a main without return.
1.2.29.0: loops over i % c run in rounds of c turns (the loop benchmark 267 -> 139 ms, faster than clang -O2).
1.2.28.0: constants of locals written once, folding of (x+c1)-c2, main uses more registers (tile-map scan 2.2 -> 1.7 times clang -O2).
1.2.27.0: the optimiser keeps what it knows across an if (tile-map scan 2.4 -> 2.1 times gcc -O2).
1.2.26.0: loops over a few constants (for dy in 0..3) are unrolled completely (tile-map scan 127 -> 86 ms); new game-like benchmarks.
1.2.25.0: small structs in registers (vec2/vec3 code faster), bigger inlining, bigger assembler label table.
1.2.24.0: 32-bit int locals in registers, NEON for 32-bit reductions (int arrays 5 times faster).
1.2.23.0 (breaking): int is 32 bits, i64 is 64 bits; python3 tools/int2i64.py converts a program; see docs/MIGRATION.md.
1.2.22.0: fixes a speed regression of 1.2.19-1.2.21 (arrays 609 -> 124 ms), peephole copies, bench gate.
1.2.21.0: wrapping counter for i % c (loop 759 -> 270 ms), call arity in the lifter (game 64 -> 56 ms).
1.2.20.0: fix: Channel of a struct crashed on a closed empty channel (1.2.19.0 regression); strength reduction of frame-cell element addresses.
1.2.19.0: struct locals in registers (vec3 faster than gcc -O2), channel receive zero fix.
1.2.18.0: heap-array matmul as fast as gcc -O2, lifter scratch register fix.
1.2.17.0: variable-stride strength reduction and wider array-check hoisting (groundwork, no measured speed change).
1.2.16.0: array checks hoisted out of counted loops (heap-array matmul 2.5 times faster).
1.2.15.0: unroll-and-jam for global and heap arrays (matmul -25 %), float copy folding (mandel -11 %), new learning book.
1.2.14.0 (pre-release, in development): vector fmla and a 4 x 8 register-blocked matrix kernel in <neuron> (14 GFLOPS on one thread, about 31 with four, the same as a C program with the same NEON kernel), vectorised loops over heap arrays and matrix indices, fixes for String fields in { }, sort_by<String> and String^, and many new documents (a tutorial of 154 lessons, a beginner series, ten guides, a cheat sheet). The speed gate of 1.3.0 is not passed yet: see the CHANGELOG for what is not claimed.
1.2.13.0: loops over arrays are shorter again (the null check and the load of the header of an array move before the loop, constants too: sums of arrays run about 1.8 times faster, a float update about 1.35 times, the outputs are the same), a function of your program that has the name of a newer library function (pad, fmt) is yours again, the library <ui> 0.2.0 with a modern look and a sliding pill tab bar, the libraries <font> (real text, Thai too) and <softcanvas>, and a tutorial of 89 lessons.
1.2.12.0: shorter loops over arrays (the null checks of local arrays are gone, copies and float constants are folded, dead writes are not written), the library <ui> (buttons, switches, sliders for apps), the layout functions fmt, tohex, pad for jout, a cookbook of 15 runnable programs and three more tutorial lessons. Still not as fast as C: see bench/vs_c.
1.2.11.0: jout, jin, jerr (the new names of cout, cin, cerr; jcmp migrate moves a program to them), the library <npu> (a layer on the NPU of the phone), faster pushes and small arrays.
1.2.10.0: loops over arrays use 10-25 % fewer instructions (floats go straight into floating-point registers, register-offset loads and stores, repeated null checks and header loads are dropped). It is not yet as fast as C: see bench/vs_c and the plan in docs/design/25-language-roadmap.md.
1.2.8.0: jcmp fmt (the formatter: white space only, never the meaning; -c checks, -p prints), the language roadmap and the first comparison with C and C++ in the docs.
1.2.7.0: a float variable lives in a floating-point register and float arrays are read and written with one instruction (about 25% faster loops of floats), the library neurongpu (the matrix product on the GPU), retrieve (search in your own texts), mlp (train a small network in a few lines), vulkan 0.3.0 (compute from SPIR-V), simd 0.10.0.
1.2.6.0: i8x16 and a.dot(b) (the int8 dot product, SDOT: quantised AI models run 2-3 times faster), arguments beyond the eighth are checked and converted, the libraries neuron 0.7.0 (a GPT that trains on the phone), gguf/llama (run GGUF models), websocket, the Gateway of discord, and a tutorial of 82 lessons (down to bits, a tiny CPU and ARM64 machine words).
1.2.5.0: the libraries web (HTTP client), telegram and discord (bots), neuron 0.2.0 with a matrix product 5-7 times faster, the first benchmark against C (bench/) and the plan to make loops fast.
1.2.4.0: a root like an OS (JARIC_ROOT: /etc, /home, /u for the programs made by jcmp), Sys::chdir, the library qr (reads QR codes), Env no longer crashes in a shared library (-l).
1.2.3.0: interfaces (itf / impl), #import <native> makes the program dynamic by itself (no -dyn), virtual methods fixed on ARM32, new libraries (canvas2d, glcanvas, glapp, tasks, OpenGL ES textures and instancing).
1.2.2.0: jcmp -novec (no NEON code), messages that name jc lib install, nine new game-engine libraries.
1.2.1.0: default arguments (int add(int a, int b = 10)), text with values inside ("x = {x}"), functions that return a value in raw #!library files.
1.2.0.0: inheritance (struct Dog : Animal, virtual / override), native GPU from J2K (-dyn, OpenGL ES 3.1, Vulkan), jcmp -j N (many cores) and -progress, Fs::read.*, a fix for bool fields of structs.
1.1.0.0: shared libraries (jcmp file.jk -l -o lib.so and export functions that C, Java (JNI) and Python can call), a bigger Regex (groups, |, {n,m}, lazy quantifiers, find_all / replace / split), and a fix for return of a String taken from an array.
1.0.0.0: the first stable release (see CHANGELOG.md). Programs built with jcmp may be sold and distributed freely, every update of jcmp 1.x is free, and a 1.x.x.x release keeps your programs working.
0.9.206: a bug fixed (a double in a register after a caught throw), LICENSE 1.2 (programs built with jcmp may be sold freely), the tutorial has 48 lessons.
0.9.205: a little more speed on ARM32 (immediates, shifts, multiplication by a power of two).
0.9.204: a much faster ARM32 target (registers for the most used doubles and numbers: nbody 14x to 3.5x of the ARM64 time, sha256 19x to 11x).
0.9.203: #require cpu "crc32" checks the CPU when the program starts; read knows more keys and has key_timeout, password, decimal; the tutorial has 44 lessons.
0.9.202: reg<int x19> c (a variable in a register), Cache::prefetch, Cpu::speculation_barrier, #require cpu "crc32" with Cpu::crc32 / crc32c, the read module for the keyboard, and a longer tutorial (36 lessons).
0.9.201: cout prints a bool as true / false and a pointer as 0x...; cerr; faster integer division on ARM32.
0.9.200: wide arithmetic in Bit (carry, 128-bit product, divide with remainder, saturating add) and Flags::c in register blocks.
0.9.199: #expect instructions <= N keeps the code of a function short (the compiler stops when it grows).
0.9.198: Cpu::inst instructions on ARM32, a faster ARM32 (10 to 25%).
0.9.197: jcmp -show NAME (the code of a function), NEON loops on ARM32, docs/LIMITS.md and docs/API.md.
0.9.196: the CPU level on ARM32 (atomics, barriers, Cpu::, register blocks, naked functions, raw words) and a faster ARM32.
0.9.195: loops of float with literals are vectorized (widths 6x -> 1x of clang); the examples of the documents are compiled by the tests.
0.9.194: the compiler runs as an ARM32 program and compiles itself there (the same result, byte for byte).
0.9.193: ARM32: SIMD vectors, #multithread loops (214 of 230 tests run the same as on ARM64).
0.9.192: ARM32: defer, expr? with a text or array content, unsigned to double (205 of 230 tests run the same as on ARM64).
0.9.191: ARM32: sleep, the clock and processes work (system calls adapted to the 32-bit structures); expr? made from the syntax tree.
0.9.190: ARM32: jcmp -target arm32 writes 32-bit ARM programs (most of the tests run the same as on ARM64); the syntax tree makes 95% of the code.
0.9.189: the syntax tree builds more functions (methods on a text, String[] parameters, assert / exit as library functions); no change for programs.
0.9.188: the cache is on by default (~/.j2k/cache, J2K_CACHE= to turn it off); jcmp -jh FILE / -api NAME write the interface of a file or of a library.
0.9.187: the compiler brings the standard library, math, cpu and net; simd, quat, complex, stats, canvas, screen are downloaded with `jget -li...
J2K / Jcmp 1.2.34.0
J2K / Jcmp 1.2.34.0
A self-hosting compiler for the J2K language that writes Linux ARM64 executables directly.
1.2.34.0: the ending .jex for programs and imports; the build bug of the compiler (buffers of 8 MB for a text of 10 MB) is fixed.
1.2.33.0: several declarations in one (int a = 1, b = 2;, also in a for head) and using Math, stdlib;.
1.2.32.0: a compare of floats and a float read from memory use the float registers directly (the particle benchmark is about 20 % faster); the repositories are now Jexcmp (this one) and Jextool (the old names are forwarded).
1.2.31.0: lambdas with fn/fnv, alloc<int n>(50) and free<n>, the line #!using asm; the result of a small-type function is cut at return; the tile-map scan is a little faster.
1.2.30.0: the types i16 and u16; fn and fnv function headers; a warning for a main without return.
1.2.29.0: loops over i % c run in rounds of c turns (the loop benchmark 267 -> 139 ms, faster than clang -O2).
1.2.28.0: constants of locals written once, folding of (x+c1)-c2, main uses more registers (tile-map scan 2.2 -> 1.7 times clang -O2).
1.2.27.0: the optimiser keeps what it knows across an if (tile-map scan 2.4 -> 2.1 times gcc -O2).
1.2.26.0: loops over a few constants (for dy in 0..3) are unrolled completely (tile-map scan 127 -> 86 ms); new game-like benchmarks.
1.2.25.0: small structs in registers (vec2/vec3 code faster), bigger inlining, bigger assembler label table.
1.2.24.0: 32-bit int locals in registers, NEON for 32-bit reductions (int arrays 5 times faster).
1.2.23.0 (breaking): int is 32 bits, i64 is 64 bits; python3 tools/int2i64.py converts a program; see docs/MIGRATION.md.
1.2.22.0: fixes a speed regression of 1.2.19-1.2.21 (arrays 609 -> 124 ms), peephole copies, bench gate.
1.2.21.0: wrapping counter for i % c (loop 759 -> 270 ms), call arity in the lifter (game 64 -> 56 ms).
1.2.20.0: fix: Channel of a struct crashed on a closed empty channel (1.2.19.0 regression); strength reduction of frame-cell element addresses.
1.2.19.0: struct locals in registers (vec3 faster than gcc -O2), channel receive zero fix.
1.2.18.0: heap-array matmul as fast as gcc -O2, lifter scratch register fix.
1.2.17.0: variable-stride strength reduction and wider array-check hoisting (groundwork, no measured speed change).
1.2.16.0: array checks hoisted out of counted loops (heap-array matmul 2.5 times faster).
1.2.15.0: unroll-and-jam for global and heap arrays (matmul -25 %), float copy folding (mandel -11 %), new learning book.
1.2.14.0 (pre-release, in development): vector fmla and a 4 x 8 register-blocked matrix kernel in <neuron> (14 GFLOPS on one thread, about 31 with four, the same as a C program with the same NEON kernel), vectorised loops over heap arrays and matrix indices, fixes for String fields in { }, sort_by<String> and String^, and many new documents (a tutorial of 154 lessons, a beginner series, ten guides, a cheat sheet). The speed gate of 1.3.0 is not passed yet: see the CHANGELOG for what is not claimed.
1.2.13.0: loops over arrays are shorter again (the null check and the load of the header of an array move before the loop, constants too: sums of arrays run about 1.8 times faster, a float update about 1.35 times, the outputs are the same), a function of your program that has the name of a newer library function (pad, fmt) is yours again, the library <ui> 0.2.0 with a modern look and a sliding pill tab bar, the libraries <font> (real text, Thai too) and <softcanvas>, and a tutorial of 89 lessons.
1.2.12.0: shorter loops over arrays (the null checks of local arrays are gone, copies and float constants are folded, dead writes are not written), the library <ui> (buttons, switches, sliders for apps), the layout functions fmt, tohex, pad for jout, a cookbook of 15 runnable programs and three more tutorial lessons. Still not as fast as C: see bench/vs_c.
1.2.11.0: jout, jin, jerr (the new names of cout, cin, cerr; jcmp migrate moves a program to them), the library <npu> (a layer on the NPU of the phone), faster pushes and small arrays.
1.2.10.0: loops over arrays use 10-25 % fewer instructions (floats go straight into floating-point registers, register-offset loads and stores, repeated null checks and header loads are dropped). It is not yet as fast as C: see bench/vs_c and the plan in docs/design/25-language-roadmap.md.
1.2.8.0: jcmp fmt (the formatter: white space only, never the meaning; -c checks, -p prints), the language roadmap and the first comparison with C and C++ in the docs.
1.2.7.0: a float variable lives in a floating-point register and float arrays are read and written with one instruction (about 25% faster loops of floats), the library neurongpu (the matrix product on the GPU), retrieve (search in your own texts), mlp (train a small network in a few lines), vulkan 0.3.0 (compute from SPIR-V), simd 0.10.0.
1.2.6.0: i8x16 and a.dot(b) (the int8 dot product, SDOT: quantised AI models run 2-3 times faster), arguments beyond the eighth are checked and converted, the libraries neuron 0.7.0 (a GPT that trains on the phone), gguf/llama (run GGUF models), websocket, the Gateway of discord, and a tutorial of 82 lessons (down to bits, a tiny CPU and ARM64 machine words).
1.2.5.0: the libraries web (HTTP client), telegram and discord (bots), neuron 0.2.0 with a matrix product 5-7 times faster, the first benchmark against C (bench/) and the plan to make loops fast.
1.2.4.0: a root like an OS (JARIC_ROOT: /etc, /home, /u for the programs made by jcmp), Sys::chdir, the library qr (reads QR codes), Env no longer crashes in a shared library (-l).
1.2.3.0: interfaces (itf / impl), #import <native> makes the program dynamic by itself (no -dyn), virtual methods fixed on ARM32, new libraries (canvas2d, glcanvas, glapp, tasks, OpenGL ES textures and instancing).
1.2.2.0: jcmp -novec (no NEON code), messages that name jc lib install, nine new game-engine libraries.
1.2.1.0: default arguments (int add(int a, int b = 10)), text with values inside ("x = {x}"), functions that return a value in raw #!library files.
1.2.0.0: inheritance (struct Dog : Animal, virtual / override), native GPU from J2K (-dyn, OpenGL ES 3.1, Vulkan), jcmp -j N (many cores) and -progress, Fs::read.*, a fix for bool fields of structs.
1.1.0.0: shared libraries (jcmp file.jk -l -o lib.so and export functions that C, Java (JNI) and Python can call), a bigger Regex (groups, |, {n,m}, lazy quantifiers, find_all / replace / split), and a fix for return of a String taken from an array.
1.0.0.0: the first stable release (see CHANGELOG.md). Programs built with jcmp may be sold and distributed freely, every update of jcmp 1.x is free, and a 1.x.x.x release keeps your programs working.
0.9.206: a bug fixed (a double in a register after a caught throw), LICENSE 1.2 (programs built with jcmp may be sold freely), the tutorial has 48 lessons.
0.9.205: a little more speed on ARM32 (immediates, shifts, multiplication by a power of two).
0.9.204: a much faster ARM32 target (registers for the most used doubles and numbers: nbody 14x to 3.5x of the ARM64 time, sha256 19x to 11x).
0.9.203: #require cpu "crc32" checks the CPU when the program starts; read knows more keys and has key_timeout, password, decimal; the tutorial has 44 lessons.
0.9.202: reg<int x19> c (a variable in a register), Cache::prefetch, Cpu::speculation_barrier, #require cpu "crc32" with Cpu::crc32 / crc32c, the read module for the keyboard, and a longer tutorial (36 lessons).
0.9.201: cout prints a bool as true / false and a pointer as 0x...; cerr; faster integer division on ARM32.
0.9.200: wide arithmetic in Bit (carry, 128-bit product, divide with remainder, saturating add) and Flags::c in register blocks.
0.9.199: #expect instructions <= N keeps the code of a function short (the compiler stops when it grows).
0.9.198: Cpu::inst instructions on ARM32, a faster ARM32 (10 to 25%).
0.9.197: jcmp -show NAME (the code of a function), NEON loops on ARM32, docs/LIMITS.md and docs/API.md.
0.9.196: the CPU level on ARM32 (atomics, barriers, Cpu::, register blocks, naked functions, raw words) and a faster ARM32.
0.9.195: loops of float with literals are vectorized (widths 6x -> 1x of clang); the examples of the documents are compiled by the tests.
0.9.194: the compiler runs as an ARM32 program and compiles itself there (the same result, byte for byte).
0.9.193: ARM32: SIMD vectors, #multithread loops (214 of 230 tests run the same as on ARM64).
0.9.192: ARM32: defer, expr? with a text or array content, unsigned to double (205 of 230 tests run the same as on ARM64).
0.9.191: ARM32: sleep, the clock and processes work (system calls adapted to the 32-bit structures); expr? made from the syntax tree.
0.9.190: ARM32: jcmp -target arm32 writes 32-bit ARM programs (most of the tests run the same as on ARM64); the syntax tree makes 95% of the code.
0.9.189: the syntax tree builds more functions (methods on a text, String[] parameters, assert / exit as library functions); no change for programs.
0.9.188: the cache is on by default (~/.j2k/cache, J2K_CACHE= to turn it off); jcmp -jh FILE / -api NAME write the interface of a file or of a library.
0.9.187: the compiler brings the standard library, math, cpu and net; simd, quat, complex, stats, canvas, screen are downloaded with jget -li install NAME.
0.9.186: Sys: the system by names with checks; the library has no s...
J2K / Jcmp 1.2.33.0
J2K / Jcmp 1.2.33.0
A self-hosting compiler for the J2K language that writes Linux ARM64 executables directly.
1.2.33.0: several declarations in one (int a = 1, b = 2;, also in a for head) and using Math, stdlib;.
1.2.32.0: a compare of floats and a float read from memory use the float registers directly (the particle benchmark is about 20 % faster); the repositories are now Jexcmp (this one) and Jextool (the old names are forwarded).
1.2.31.0: lambdas with fn/fnv, alloc<int n>(50) and free<n>, the line #!using asm; the result of a small-type function is cut at return; the tile-map scan is a little faster.
1.2.30.0: the types i16 and u16; fn and fnv function headers; a warning for a main without return.
1.2.29.0: loops over i % c run in rounds of c turns (the loop benchmark 267 -> 139 ms, faster than clang -O2).
1.2.28.0: constants of locals written once, folding of (x+c1)-c2, main uses more registers (tile-map scan 2.2 -> 1.7 times clang -O2).
1.2.27.0: the optimiser keeps what it knows across an if (tile-map scan 2.4 -> 2.1 times gcc -O2).
1.2.26.0: loops over a few constants (for dy in 0..3) are unrolled completely (tile-map scan 127 -> 86 ms); new game-like benchmarks.
1.2.25.0: small structs in registers (vec2/vec3 code faster), bigger inlining, bigger assembler label table.
1.2.24.0: 32-bit int locals in registers, NEON for 32-bit reductions (int arrays 5 times faster).
1.2.23.0 (breaking): int is 32 bits, i64 is 64 bits; python3 tools/int2i64.py converts a program; see docs/MIGRATION.md.
1.2.22.0: fixes a speed regression of 1.2.19-1.2.21 (arrays 609 -> 124 ms), peephole copies, bench gate.
1.2.21.0: wrapping counter for i % c (loop 759 -> 270 ms), call arity in the lifter (game 64 -> 56 ms).
1.2.20.0: fix: Channel of a struct crashed on a closed empty channel (1.2.19.0 regression); strength reduction of frame-cell element addresses.
1.2.19.0: struct locals in registers (vec3 faster than gcc -O2), channel receive zero fix.
1.2.18.0: heap-array matmul as fast as gcc -O2, lifter scratch register fix.
1.2.17.0: variable-stride strength reduction and wider array-check hoisting (groundwork, no measured speed change).
1.2.16.0: array checks hoisted out of counted loops (heap-array matmul 2.5 times faster).
1.2.15.0: unroll-and-jam for global and heap arrays (matmul -25 %), float copy folding (mandel -11 %), new learning book.
1.2.14.0 (pre-release, in development): vector fmla and a 4 x 8 register-blocked matrix kernel in <neuron> (14 GFLOPS on one thread, about 31 with four, the same as a C program with the same NEON kernel), vectorised loops over heap arrays and matrix indices, fixes for String fields in { }, sort_by<String> and String^, and many new documents (a tutorial of 154 lessons, a beginner series, ten guides, a cheat sheet). The speed gate of 1.3.0 is not passed yet: see the CHANGELOG for what is not claimed.
1.2.13.0: loops over arrays are shorter again (the null check and the load of the header of an array move before the loop, constants too: sums of arrays run about 1.8 times faster, a float update about 1.35 times, the outputs are the same), a function of your program that has the name of a newer library function (pad, fmt) is yours again, the library <ui> 0.2.0 with a modern look and a sliding pill tab bar, the libraries <font> (real text, Thai too) and <softcanvas>, and a tutorial of 89 lessons.
1.2.12.0: shorter loops over arrays (the null checks of local arrays are gone, copies and float constants are folded, dead writes are not written), the library <ui> (buttons, switches, sliders for apps), the layout functions fmt, tohex, pad for jout, a cookbook of 15 runnable programs and three more tutorial lessons. Still not as fast as C: see bench/vs_c.
1.2.11.0: jout, jin, jerr (the new names of cout, cin, cerr; jcmp migrate moves a program to them), the library <npu> (a layer on the NPU of the phone), faster pushes and small arrays.
1.2.10.0: loops over arrays use 10-25 % fewer instructions (floats go straight into floating-point registers, register-offset loads and stores, repeated null checks and header loads are dropped). It is not yet as fast as C: see bench/vs_c and the plan in docs/design/25-language-roadmap.md.
1.2.8.0: jcmp fmt (the formatter: white space only, never the meaning; -c checks, -p prints), the language roadmap and the first comparison with C and C++ in the docs.
1.2.7.0: a float variable lives in a floating-point register and float arrays are read and written with one instruction (about 25% faster loops of floats), the library neurongpu (the matrix product on the GPU), retrieve (search in your own texts), mlp (train a small network in a few lines), vulkan 0.3.0 (compute from SPIR-V), simd 0.10.0.
1.2.6.0: i8x16 and a.dot(b) (the int8 dot product, SDOT: quantised AI models run 2-3 times faster), arguments beyond the eighth are checked and converted, the libraries neuron 0.7.0 (a GPT that trains on the phone), gguf/llama (run GGUF models), websocket, the Gateway of discord, and a tutorial of 82 lessons (down to bits, a tiny CPU and ARM64 machine words).
1.2.5.0: the libraries web (HTTP client), telegram and discord (bots), neuron 0.2.0 with a matrix product 5-7 times faster, the first benchmark against C (bench/) and the plan to make loops fast.
1.2.4.0: a root like an OS (JARIC_ROOT: /etc, /home, /u for the programs made by jcmp), Sys::chdir, the library qr (reads QR codes), Env no longer crashes in a shared library (-l).
1.2.3.0: interfaces (itf / impl), #import <native> makes the program dynamic by itself (no -dyn), virtual methods fixed on ARM32, new libraries (canvas2d, glcanvas, glapp, tasks, OpenGL ES textures and instancing).
1.2.2.0: jcmp -novec (no NEON code), messages that name jc lib install, nine new game-engine libraries.
1.2.1.0: default arguments (int add(int a, int b = 10)), text with values inside ("x = {x}"), functions that return a value in raw #!library files.
1.2.0.0: inheritance (struct Dog : Animal, virtual / override), native GPU from J2K (-dyn, OpenGL ES 3.1, Vulkan), jcmp -j N (many cores) and -progress, Fs::read.*, a fix for bool fields of structs.
1.1.0.0: shared libraries (jcmp file.jk -l -o lib.so and export functions that C, Java (JNI) and Python can call), a bigger Regex (groups, |, {n,m}, lazy quantifiers, find_all / replace / split), and a fix for return of a String taken from an array.
1.0.0.0: the first stable release (see CHANGELOG.md). Programs built with jcmp may be sold and distributed freely, every update of jcmp 1.x is free, and a 1.x.x.x release keeps your programs working.
0.9.206: a bug fixed (a double in a register after a caught throw), LICENSE 1.2 (programs built with jcmp may be sold freely), the tutorial has 48 lessons.
0.9.205: a little more speed on ARM32 (immediates, shifts, multiplication by a power of two).
0.9.204: a much faster ARM32 target (registers for the most used doubles and numbers: nbody 14x to 3.5x of the ARM64 time, sha256 19x to 11x).
0.9.203: #require cpu "crc32" checks the CPU when the program starts; read knows more keys and has key_timeout, password, decimal; the tutorial has 44 lessons.
0.9.202: reg<int x19> c (a variable in a register), Cache::prefetch, Cpu::speculation_barrier, #require cpu "crc32" with Cpu::crc32 / crc32c, the read module for the keyboard, and a longer tutorial (36 lessons).
0.9.201: cout prints a bool as true / false and a pointer as 0x...; cerr; faster integer division on ARM32.
0.9.200: wide arithmetic in Bit (carry, 128-bit product, divide with remainder, saturating add) and Flags::c in register blocks.
0.9.199: #expect instructions <= N keeps the code of a function short (the compiler stops when it grows).
0.9.198: Cpu::inst instructions on ARM32, a faster ARM32 (10 to 25%).
0.9.197: jcmp -show NAME (the code of a function), NEON loops on ARM32, docs/LIMITS.md and docs/API.md.
0.9.196: the CPU level on ARM32 (atomics, barriers, Cpu::, register blocks, naked functions, raw words) and a faster ARM32.
0.9.195: loops of float with literals are vectorized (widths 6x -> 1x of clang); the examples of the documents are compiled by the tests.
0.9.194: the compiler runs as an ARM32 program and compiles itself there (the same result, byte for byte).
0.9.193: ARM32: SIMD vectors, #multithread loops (214 of 230 tests run the same as on ARM64).
0.9.192: ARM32: defer, expr? with a text or array content, unsigned to double (205 of 230 tests run the same as on ARM64).
0.9.191: ARM32: sleep, the clock and processes work (system calls adapted to the 32-bit structures); expr? made from the syntax tree.
0.9.190: ARM32: jcmp -target arm32 writes 32-bit ARM programs (most of the tests run the same as on ARM64); the syntax tree makes 95% of the code.
0.9.189: the syntax tree builds more functions (methods on a text, String[] parameters, assert / exit as library functions); no change for programs.
0.9.188: the cache is on by default (~/.j2k/cache, J2K_CACHE= to turn it off); jcmp -jh FILE / -api NAME write the interface of a file or of a library.
0.9.187: the compiler brings the standard library, math, cpu and net; simd, quat, complex, stats, canvas, screen are downloaded with jget -li install NAME.
0.9.186: Sys: the system by names with checks; the library has no system call numbers; syscall(...) in a program warns, #allow syscall.
0.9.185: the cache is easy (J2K_CACHE, -nocache, `-clea...
J2K / Jcmp 1.2.32.0
J2K / Jcmp 1.2.32.0
A self-hosting compiler for the J2K language that writes Linux ARM64 executables directly.
1.2.32.0: a compare of floats and a float read from memory use the float registers directly (the particle benchmark is about 20 % faster); the repositories are now Jexcmp (this one) and Jextool (the old names are forwarded).
1.2.31.0: lambdas with fn/fnv, alloc<int n>(50) and free<n>, the line #!using asm; the result of a small-type function is cut at return; the tile-map scan is a little faster.
1.2.30.0: the types i16 and u16; fn and fnv function headers; a warning for a main without return.
1.2.29.0: loops over i % c run in rounds of c turns (the loop benchmark 267 -> 139 ms, faster than clang -O2).
1.2.28.0: constants of locals written once, folding of (x+c1)-c2, main uses more registers (tile-map scan 2.2 -> 1.7 times clang -O2).
1.2.27.0: the optimiser keeps what it knows across an if (tile-map scan 2.4 -> 2.1 times gcc -O2).
1.2.26.0: loops over a few constants (for dy in 0..3) are unrolled completely (tile-map scan 127 -> 86 ms); new game-like benchmarks.
1.2.25.0: small structs in registers (vec2/vec3 code faster), bigger inlining, bigger assembler label table.
1.2.24.0: 32-bit int locals in registers, NEON for 32-bit reductions (int arrays 5 times faster).
1.2.23.0 (breaking): int is 32 bits, i64 is 64 bits; python3 tools/int2i64.py converts a program; see docs/MIGRATION.md.
1.2.22.0: fixes a speed regression of 1.2.19-1.2.21 (arrays 609 -> 124 ms), peephole copies, bench gate.
1.2.21.0: wrapping counter for i % c (loop 759 -> 270 ms), call arity in the lifter (game 64 -> 56 ms).
1.2.20.0: fix: Channel of a struct crashed on a closed empty channel (1.2.19.0 regression); strength reduction of frame-cell element addresses.
1.2.19.0: struct locals in registers (vec3 faster than gcc -O2), channel receive zero fix.
1.2.18.0: heap-array matmul as fast as gcc -O2, lifter scratch register fix.
1.2.17.0: variable-stride strength reduction and wider array-check hoisting (groundwork, no measured speed change).
1.2.16.0: array checks hoisted out of counted loops (heap-array matmul 2.5 times faster).
1.2.15.0: unroll-and-jam for global and heap arrays (matmul -25 %), float copy folding (mandel -11 %), new learning book.
1.2.14.0 (pre-release, in development): vector fmla and a 4 x 8 register-blocked matrix kernel in <neuron> (14 GFLOPS on one thread, about 31 with four, the same as a C program with the same NEON kernel), vectorised loops over heap arrays and matrix indices, fixes for String fields in { }, sort_by<String> and String^, and many new documents (a tutorial of 154 lessons, a beginner series, ten guides, a cheat sheet). The speed gate of 1.3.0 is not passed yet: see the CHANGELOG for what is not claimed.
1.2.13.0: loops over arrays are shorter again (the null check and the load of the header of an array move before the loop, constants too: sums of arrays run about 1.8 times faster, a float update about 1.35 times, the outputs are the same), a function of your program that has the name of a newer library function (pad, fmt) is yours again, the library <ui> 0.2.0 with a modern look and a sliding pill tab bar, the libraries <font> (real text, Thai too) and <softcanvas>, and a tutorial of 89 lessons.
1.2.12.0: shorter loops over arrays (the null checks of local arrays are gone, copies and float constants are folded, dead writes are not written), the library <ui> (buttons, switches, sliders for apps), the layout functions fmt, tohex, pad for jout, a cookbook of 15 runnable programs and three more tutorial lessons. Still not as fast as C: see bench/vs_c.
1.2.11.0: jout, jin, jerr (the new names of cout, cin, cerr; jcmp migrate moves a program to them), the library <npu> (a layer on the NPU of the phone), faster pushes and small arrays.
1.2.10.0: loops over arrays use 10-25 % fewer instructions (floats go straight into floating-point registers, register-offset loads and stores, repeated null checks and header loads are dropped). It is not yet as fast as C: see bench/vs_c and the plan in docs/design/25-language-roadmap.md.
1.2.8.0: jcmp fmt (the formatter: white space only, never the meaning; -c checks, -p prints), the language roadmap and the first comparison with C and C++ in the docs.
1.2.7.0: a float variable lives in a floating-point register and float arrays are read and written with one instruction (about 25% faster loops of floats), the library neurongpu (the matrix product on the GPU), retrieve (search in your own texts), mlp (train a small network in a few lines), vulkan 0.3.0 (compute from SPIR-V), simd 0.10.0.
1.2.6.0: i8x16 and a.dot(b) (the int8 dot product, SDOT: quantised AI models run 2-3 times faster), arguments beyond the eighth are checked and converted, the libraries neuron 0.7.0 (a GPT that trains on the phone), gguf/llama (run GGUF models), websocket, the Gateway of discord, and a tutorial of 82 lessons (down to bits, a tiny CPU and ARM64 machine words).
1.2.5.0: the libraries web (HTTP client), telegram and discord (bots), neuron 0.2.0 with a matrix product 5-7 times faster, the first benchmark against C (bench/) and the plan to make loops fast.
1.2.4.0: a root like an OS (JARIC_ROOT: /etc, /home, /u for the programs made by jcmp), Sys::chdir, the library qr (reads QR codes), Env no longer crashes in a shared library (-l).
1.2.3.0: interfaces (itf / impl), #import <native> makes the program dynamic by itself (no -dyn), virtual methods fixed on ARM32, new libraries (canvas2d, glcanvas, glapp, tasks, OpenGL ES textures and instancing).
1.2.2.0: jcmp -novec (no NEON code), messages that name jc lib install, nine new game-engine libraries.
1.2.1.0: default arguments (int add(int a, int b = 10)), text with values inside ("x = {x}"), functions that return a value in raw #!library files.
1.2.0.0: inheritance (struct Dog : Animal, virtual / override), native GPU from J2K (-dyn, OpenGL ES 3.1, Vulkan), jcmp -j N (many cores) and -progress, Fs::read.*, a fix for bool fields of structs.
1.1.0.0: shared libraries (jcmp file.jk -l -o lib.so and export functions that C, Java (JNI) and Python can call), a bigger Regex (groups, |, {n,m}, lazy quantifiers, find_all / replace / split), and a fix for return of a String taken from an array.
1.0.0.0: the first stable release (see CHANGELOG.md). Programs built with jcmp may be sold and distributed freely, every update of jcmp 1.x is free, and a 1.x.x.x release keeps your programs working.
0.9.206: a bug fixed (a double in a register after a caught throw), LICENSE 1.2 (programs built with jcmp may be sold freely), the tutorial has 48 lessons.
0.9.205: a little more speed on ARM32 (immediates, shifts, multiplication by a power of two).
0.9.204: a much faster ARM32 target (registers for the most used doubles and numbers: nbody 14x to 3.5x of the ARM64 time, sha256 19x to 11x).
0.9.203: #require cpu "crc32" checks the CPU when the program starts; read knows more keys and has key_timeout, password, decimal; the tutorial has 44 lessons.
0.9.202: reg<int x19> c (a variable in a register), Cache::prefetch, Cpu::speculation_barrier, #require cpu "crc32" with Cpu::crc32 / crc32c, the read module for the keyboard, and a longer tutorial (36 lessons).
0.9.201: cout prints a bool as true / false and a pointer as 0x...; cerr; faster integer division on ARM32.
0.9.200: wide arithmetic in Bit (carry, 128-bit product, divide with remainder, saturating add) and Flags::c in register blocks.
0.9.199: #expect instructions <= N keeps the code of a function short (the compiler stops when it grows).
0.9.198: Cpu::inst instructions on ARM32, a faster ARM32 (10 to 25%).
0.9.197: jcmp -show NAME (the code of a function), NEON loops on ARM32, docs/LIMITS.md and docs/API.md.
0.9.196: the CPU level on ARM32 (atomics, barriers, Cpu::, register blocks, naked functions, raw words) and a faster ARM32.
0.9.195: loops of float with literals are vectorized (widths 6x -> 1x of clang); the examples of the documents are compiled by the tests.
0.9.194: the compiler runs as an ARM32 program and compiles itself there (the same result, byte for byte).
0.9.193: ARM32: SIMD vectors, #multithread loops (214 of 230 tests run the same as on ARM64).
0.9.192: ARM32: defer, expr? with a text or array content, unsigned to double (205 of 230 tests run the same as on ARM64).
0.9.191: ARM32: sleep, the clock and processes work (system calls adapted to the 32-bit structures); expr? made from the syntax tree.
0.9.190: ARM32: jcmp -target arm32 writes 32-bit ARM programs (most of the tests run the same as on ARM64); the syntax tree makes 95% of the code.
0.9.189: the syntax tree builds more functions (methods on a text, String[] parameters, assert / exit as library functions); no change for programs.
0.9.188: the cache is on by default (~/.j2k/cache, J2K_CACHE= to turn it off); jcmp -jh FILE / -api NAME write the interface of a file or of a library.
0.9.187: the compiler brings the standard library, math, cpu and net; simd, quat, complex, stats, canvas, screen are downloaded with jget -li install NAME.
0.9.186: Sys: the system by names with checks; the library has no system call numbers; syscall(...) in a program warns, #allow syscall.
0.9.185: the cache is easy (J2K_CACHE, -nocache, -clean); pointer arithmetic from the syntax tree.
0.9.184: TLS also speaks AES-128-GCM (more servers are reached)...