Bug 1689434 Comment 5 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Tried length-3/4 strings

patch stack: https://hg.mozilla.org/try/pushloghtml?changeset=dcbe74ad27b96188dd114b5405d24ad3bf16443b

The result of large files in modified parsemark: https://arai-a.github.io/raptor-graph/pgraph.html

  * `parse_full`: full parse
  * `dumpStencil_full`: full parse + compile to stencil
  * `dumpStencil_lazy`: lazy parse + compile to stencil
  * `compile_full`: full parse + compile to stencil + instantiate
  * `compile_lazy`: lazy parse + compile to stencil + instantiate
  * `decode_full`: decode of (full parse + compile to stencil + encode) + instantiate
  * `decode_lazy`: decode of (lazy parse + compile to stencil + encode) + instantiate

across files
  * parse and compile to stencil are improved in most case:
    * gmail
      * parse_full: -1.2ms (25.67 => 24.47, -4.67%)
      * dumpStencil_full: -2.13ms (61.7 => 59.57, -3.45%)
    * MochiKit
      * parse_full: -0.34ms (4.48 => 4.14, -7.59%)
      * dumpStencil_full: -0.22ms (8.89 => 8.67, -2.47%)
  * instantiate is regressed
    * the improvement for compile is less than the improvement for dumpStencil
      * gmail
        * dumpStencil_full: -2.13ms (61.7 => 59.57)
        * compile_full: -0.92ms (67.28 => 66.36)
      * MochiKit
        * dumpStencil_full: -0.22ms (8.89 => 8.67)
        * compile_full: -0.14ms (9.48 => 9.34)
    * in some case, compile become regression
      * twitter
        * dumpStencil_full: -0.27ms (12.27 => 12)
        * compile_full: +0.05ms (12.69 => 12.74)
  * decode is regressed
    * gmail
      * decode_full: +0.59ms (8.59 => 9.18)
      * decode_lazy: +0.5ms (3.4 => 3.9)
    * MochiKit
      * decode_full: +0.09ms (1.14 => 1.23)
      * decode_lazy: +0.02ms (0.54 => 0.56)
    * twitter
      * decode_full: +0.01ms (1.83 => 1.84)
      * decode_lazy: +0.02ms (0.68 => 0.7)

The regression is most likely caused by `getExistingAtomAt` (that affects instantiation step), there
  * before the patch, length-3/4 strings are simple pointer access for already instantiated JSAtom in atomCache
  * after the patch, it becomes:
    * switch-case for well-known atom indices
    * simple hash map lookup for atom index -> JSAtom
    * `JSAtom` atomization
Tried length-3/4 strings

patch stack: https://hg.mozilla.org/try/pushloghtml?changeset=dcbe74ad27b96188dd114b5405d24ad3bf16443b

The result of large files in modified parsemark: https://arai-a.github.io/raptor-graph/pgraph.html

  * `parse_full`: full parse
  * `dumpStencil_full`: full parse + compile to stencil
  * `dumpStencil_lazy`: lazy parse + compile to stencil
  * `compile_full`: full parse + compile to stencil + instantiate
  * `compile_lazy`: lazy parse + compile to stencil + instantiate
  * `decode_full`: decode of (full parse + compile to stencil + encode) + instantiate
  * `decode_lazy`: decode of (lazy parse + compile to stencil + encode) + instantiate

across files
  * parse and compile to stencil are improved in most case:
    * gmail
      * parse_full: -1.2ms (25.67 => 24.47, -4.67%)
      * dumpStencil_full: -2.13ms (61.7 => 59.57, -3.45%)
    * MochiKit
      * parse_full: -0.34ms (4.48 => 4.14, -7.59%)
      * dumpStencil_full: -0.22ms (8.89 => 8.67, -2.47%)
  * instantiate is regressed
    * the improvement for compile is less than the improvement for dumpStencil
      * gmail
        * dumpStencil_full: -2.13ms (61.7 => 59.57)
        * compile_full: -0.92ms (67.28 => 66.36)
      * MochiKit
        * dumpStencil_full: -0.22ms (8.89 => 8.67)
        * compile_full: -0.14ms (9.48 => 9.34)
    * in some case, compile become regression
      * twitter
        * dumpStencil_full: -0.27ms (12.27 => 12)
        * compile_full: +0.05ms (12.69 => 12.74)
  * decode + instantiation is regressed
    * gmail
      * decode_full: +0.59ms (8.59 => 9.18)
      * decode_lazy: +0.5ms (3.4 => 3.9)
    * MochiKit
      * decode_full: +0.09ms (1.14 => 1.23)
      * decode_lazy: +0.02ms (0.54 => 0.56)
    * twitter
      * decode_full: +0.01ms (1.83 => 1.84)
      * decode_lazy: +0.02ms (0.68 => 0.7)

The regression is most likely caused by `getExistingAtomAt` (that affects instantiation step), there
  * before the patch, length-3/4 strings are simple pointer access for already instantiated JSAtom in atomCache
  * after the patch, it becomes:
    * switch-case for well-known atom indices
    * simple hash map lookup for atom index -> JSAtom
    * `JSAtom` atomization
Tried length-3/4 strings

(NOTE: the following result is without length-4 cache properly working)

patch stack: https://hg.mozilla.org/try/pushloghtml?changeset=dcbe74ad27b96188dd114b5405d24ad3bf16443b

The result of large files in modified parsemark: https://arai-a.github.io/raptor-graph/pgraph.html

  * `parse_full`: full parse
  * `dumpStencil_full`: full parse + compile to stencil
  * `dumpStencil_lazy`: lazy parse + compile to stencil
  * `compile_full`: full parse + compile to stencil + instantiate
  * `compile_lazy`: lazy parse + compile to stencil + instantiate
  * `decode_full`: decode of (full parse + compile to stencil + encode) + instantiate
  * `decode_lazy`: decode of (lazy parse + compile to stencil + encode) + instantiate

across files
  * parse and compile to stencil are improved in most case:
    * gmail
      * parse_full: -1.2ms (25.67 => 24.47, -4.67%)
      * dumpStencil_full: -2.13ms (61.7 => 59.57, -3.45%)
    * MochiKit
      * parse_full: -0.34ms (4.48 => 4.14, -7.59%)
      * dumpStencil_full: -0.22ms (8.89 => 8.67, -2.47%)
  * instantiate is regressed
    * the improvement for compile is less than the improvement for dumpStencil
      * gmail
        * dumpStencil_full: -2.13ms (61.7 => 59.57)
        * compile_full: -0.92ms (67.28 => 66.36)
      * MochiKit
        * dumpStencil_full: -0.22ms (8.89 => 8.67)
        * compile_full: -0.14ms (9.48 => 9.34)
    * in some case, compile become regression
      * twitter
        * dumpStencil_full: -0.27ms (12.27 => 12)
        * compile_full: +0.05ms (12.69 => 12.74)
  * decode + instantiation is regressed
    * gmail
      * decode_full: +0.59ms (8.59 => 9.18)
      * decode_lazy: +0.5ms (3.4 => 3.9)
    * MochiKit
      * decode_full: +0.09ms (1.14 => 1.23)
      * decode_lazy: +0.02ms (0.54 => 0.56)
    * twitter
      * decode_full: +0.01ms (1.83 => 1.84)
      * decode_lazy: +0.02ms (0.68 => 0.7)

The regression is most likely caused by `getExistingAtomAt` (that affects instantiation step), there
  * before the patch, length-3/4 strings are simple pointer access for already instantiated JSAtom in atomCache
  * after the patch, it becomes:
    * switch-case for well-known atom indices
    * simple hash map lookup for atom index -> JSAtom
    * `JSAtom` atomization

Back to Bug 1689434 Comment 5