System/ReleaseNotes/J805

From J Wiki
Jump to navigation Jump to search

>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help 


J805 release - 19 December 2016

Changes to the base system

The Windows J engine is updated to J805

New features:

  • If the last sentence in an explicit verb or a T-block produces a non-noun result, the message 'noun result was required' is produced, rather than 'syntax error' as formerly
  • Boxing in console display and in the result of ": recognizes UTF-8 characters and treats them as one character
  • Chinese/Japanese/Korean (CJK) characters are formatted as double-width or single-width according to the character code
  • New character datatype added: 32-bit-wide characters.

Performance improvements (timings taken on 64-bit Windows):

  • Memory allocation rewritten
    • Special instruction exploited to find block size
    • Allocate/free recoded for speed
    • Indirect function calls removed to be more congenial to a pipelined CPU
    • Faster garbage collector
    • Macros used to speed up fixed allocations
  • Parser rewritten to match executable fragments faster, and to avoid memory allocation
  • Major reduction in overhead for use counts. Will be most noticeable for large boxed arrays
    • ] and [ no longer touch the use count
    • The use count is no longer used to signal that a routine returns its argument as the result
  • Speedy Singletons: atomic operations on nouns that contain exactly one atom are processed through a low-overhead path. Will be most noticeable for verbs of low rank or with explicit loops.
  • Execution of explicit definitions sped up. Especially helpful for low-rank verbs.
    • When an explicit definition is loaded, it is scanned for non-locative names. An initial symbol table is created containing all these names, and references to them are prehashed and point directly to the symbol. This avoids the overhead of allocating and populating a symbol table at each invocation of an explicit definition, and makes each symbol lookup much faster
    • Execution of explicit definitions streamlined to avoid memory allocations
    • Explicit definitions are scanned to flag sentences that cannot possibly produce the result of the definition, and save the use-count overhead required to carry those results along
  • Perform operations in place where possible. Saves time and space. This supersedes the special in-place cases cases formerly supported. Details here.
    • Operations are performed in place when the verb supports it and the arguments allow it
    • Verbs that support in-place operations are:
      • x , y
      • , y
      • x m} y
      • x v0`v1`v2} y
      • u/ y for any u
      • all atomic verbs (including arithmetic) except for | and x o. y
    • arguments that can be overwritten in place are:
      • result of a verb (including an intermediate result in fork/hook/u@:v etc.)
      • a noun that is about to be reassigned
    • Foreign 9!:53 provides control over in-placing of names that are about to be reassigned
  • Tolerant comparison rewritten, approx. 5x faster on random data
  • Other comparisons rewritten, approx. 3x faster on random data except for x = y which is not improved
  • x + y and x - y on integers moved out of assembler code to C, allowing in-place execution plus a small performance improvement

Code restructuring

  • Assembler code replaced by standard C code with performance almost as good, and with code to use compiler intrinsic functions to get performance equivalent to that of hand-coded assembler

Changes to the Qt IDE

The Qt IDE version is 1.5.2, and is built with Qt 5.6 on Windows and OSX, and with Qt 5.2 on Linux.

Otherwise, J805 has only two minor updates to the Qt IDE:

  • add wd 'sm get termcwh' to read term character size
  • add a clip button to Directory Match

>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help