Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ruby/json
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 84443e8
Choose a base ref
...
head repository: ruby/json
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0bfe7cc
Choose a head ref
  • 20 commits
  • 10 files changed
  • 2 contributors

Commits on Apr 24, 2025

  1. Bring back JSON::PRETTY_STATE_PROTOTYPE with a deprecation

    Fix: #788
    
    `multi_json` rely on it, even though it was never documented as
    public API.
    
    Bringing it back as a method so it can emit a deprecation warning.
    byroot committed Apr 24, 2025
    Configuration menu
    Copy the full SHA
    123121b View commit details
    Browse the repository at this point in the history
  2. Merge pull request #789 from byroot/deprecated-pretty-prototype

    Bring back JSON::PRETTY_STATE_PROTOTYPE with a deprecation
    byroot authored Apr 24, 2025
    Configuration menu
    Copy the full SHA
    c8ae2c5 View commit details
    Browse the repository at this point in the history
  3. Release 2.11.2

    byroot committed Apr 24, 2025
    Configuration menu
    Copy the full SHA
    c985e8c View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2025

  1. Stop caching the generator state pointer

    Fix: #790
    
    If we end up calling something that spills the state
    on the heap, the pointer we received is outdated and
    may be out of sync.
    byroot committed Apr 25, 2025
    Configuration menu
    Copy the full SHA
    2ffa4ea View commit details
    Browse the repository at this point in the history
  2. Merge pull request #791 from byroot/fix-pretty-generate

    Stop caching the generator state pointer
    byroot authored Apr 25, 2025
    Configuration menu
    Copy the full SHA
    d316f93 View commit details
    Browse the repository at this point in the history
  3. Release 2.11.3

    byroot committed Apr 25, 2025
    Configuration menu
    Copy the full SHA
    3e025f7 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2025

  1. Handle non-string keys returning immediate values via to_s

    We can't directly call `RBASIC_CLASS` as the return value of
    `to_s` may be an immediate.
    byroot committed Apr 27, 2025
    Configuration menu
    Copy the full SHA
    12dc394 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #792 from byroot/handle-to-s-immediate

    Handle non-string keys returning immediate values via `to_s`
    byroot authored Apr 27, 2025
    Configuration menu
    Copy the full SHA
    05cc998 View commit details
    Browse the repository at this point in the history
  3. Use RB_TYPE_P

    byroot committed Apr 27, 2025
    Configuration menu
    Copy the full SHA
    b14250f View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2025

  1. Introduce ARM Neon and SSE2 SIMD. (#743)

    See the pull request for the long development history: #743
    
    ```
    == Encoding activitypub.json (52595 bytes)
    ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +YJIT +PRISM [arm64-darwin24]
    Warming up --------------------------------------
                   after     2.913k i/100ms
    Calculating -------------------------------------
                   after     29.377k (± 2.0%) i/s   (34.04 μs/i) -    148.563k in   5.059169s
    
    Comparison:
                  before:    23314.1 i/s
                   after:    29377.3 i/s - 1.26x  faster
    
    
    == Encoding citm_catalog.json (500298 bytes)
    ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +YJIT +PRISM [arm64-darwin24]
    Warming up --------------------------------------
                   after   152.000 i/100ms
    Calculating -------------------------------------
                   after      1.569k (± 0.8%) i/s  (637.49 μs/i) -      7.904k in   5.039001s
    
    Comparison:
                  before:     1485.6 i/s
                   after:     1568.7 i/s - 1.06x  faster
    
    
    == Encoding twitter.json (466906 bytes)
    ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +YJIT +PRISM [arm64-darwin24]
    Warming up --------------------------------------
                   after   309.000 i/100ms
    Calculating -------------------------------------
                   after      3.115k (± 3.1%) i/s  (321.01 μs/i) -     15.759k in   5.063776s
    
    Comparison:
                  before:     2508.3 i/s
                   after:     3115.2 i/s - 1.24x  faster
    ```
    samyron authored Apr 28, 2025
    Configuration menu
    Copy the full SHA
    4900352 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2739de4 View commit details
    Browse the repository at this point in the history
  3. SIMD: Match control char and double quote in one pass

    `c < 32 || c == 34` is equivalent to `c ^ 2 < 33`.
    
    Found in: https://lemire.me/blog/2025/04/13/detect-control-characters-quotes-and-backslashes-efficiently-using-swar/
    
    The gain seem mostly present on micro-benchmark, and even there aren't
    very consistent, but it's never slower.
    
    ```
    == Encoding long string (124001 bytes)
    ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +YJIT +PRISM [arm64-darwin24]
    Warming up --------------------------------------
                   after     5.295k i/100ms
    Calculating -------------------------------------
                   after     55.796k (± 3.4%) i/s   (17.92 μs/i) -    280.635k in   5.035690s
    
    Comparison:
                  before:    49840.7 i/s
                   after:    55795.8 i/s - 1.12x  faster
    ```
    byroot committed Apr 28, 2025
    Configuration menu
    Copy the full SHA
    034c5de View commit details
    Browse the repository at this point in the history
  4. SIMD: Match control char and double quote in one pass (#793)

    `c < 32 || c == 34` is equivalent to `c ^ 2 < 33`.
    
    Found in: https://lemire.me/blog/2025/04/13/detect-control-characters-quotes-and-backslashes-efficiently-using-swar/
    
    The gain seem mostly present on micro-benchmark, and even there aren't
    very consistent, but it's never slower.
    
    ```
    == Encoding long string (124001 bytes)
    ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +YJIT +PRISM [arm64-darwin24]
    Warming up --------------------------------------
                   after     5.295k i/100ms
    Calculating -------------------------------------
                   after     55.796k (± 3.4%) i/s   (17.92 μs/i) -    280.635k in   5.035690s
    
    Comparison:
                  before:    49840.7 i/s
                   after:    55795.8 i/s - 1.12x  faster
    ```
    byroot authored Apr 28, 2025
    Configuration menu
    Copy the full SHA
    0ae5465 View commit details
    Browse the repository at this point in the history
  5. Fix i686 builds

    We should test compilation with `-msse2` because we need to
    test with whatever arguments Ruby will be compiled with.
    byroot committed Apr 28, 2025
    Configuration menu
    Copy the full SHA
    0a87136 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #794 from byroot/fix-i686-builds

    Fix i686 builds
    byroot authored Apr 28, 2025
    Configuration menu
    Copy the full SHA
    3f7f0e4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d7d60cc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6b05990 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2025

  1. Update changelog

    byroot committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    410d3ed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d9a42c2 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #795 from samyron/sm/remove-unnecessary-conditional

    Remove unnecessary conditional in escape_UTF8_char_basic.
    byroot authored Apr 29, 2025
    Configuration menu
    Copy the full SHA
    0bfe7cc View commit details
    Browse the repository at this point in the history
Loading