| Age | Commit message (Collapse) | Author |
|
We need to allocate at least sizeof(struct RString) when the string is
embedded on garbage collectors that support slot sizes less than 40 bytes.
|
|
|
|
(https://github.com/ruby/erb/pull/91)
https://github.com/ruby/erb/commit/6bceee7d6e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following script leaks memory:
10.times do
100_000.times do
"\ufffd".encode(Encoding::US_ASCII, fallback: proc { Object.new })
rescue
end
puts `ps -o rss= -p #{$$}`
end
Before:
450244
887748
1325124
1762756
2200260
2637508
3075012
3512516
3950020
4387524
After:
12236
12364
12748
13004
13388
13516
13772
13772
13772
13772
|
|
https://github.com/ruby/json/commit/82b030f294
|
|
https://github.com/ruby/json/commit/3ea744ad67
|
|
```
../../../../../../ext/json/ext/parser/parser.c:1142:40: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
1142 | if (RB_UNLIKELY(first_digit == '0' && mantissa_digits > 1 || negative && mantissa_digits == 0)) {
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
```
https://github.com/ruby/json/commit/ded62a5122
|
|
Closes: https://github.com/ruby/json/pull/881
If we encounter a newline, it is likely that the document is pretty printed,
hence that the newline is followed by multiple spaces.
In such case we can use SWAR to count up to eight consecutive spaces at once.
```
== Parsing activitypub.json (58160 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
after 1.118k i/100ms
Calculating -------------------------------------
after 11.223k (± 0.7%) i/s (89.10 μs/i) - 57.018k in 5.080522s
Comparison:
before: 10834.4 i/s
after: 11223.4 i/s - 1.04x faster
== Parsing twitter.json (567916 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
after 118.000 i/100ms
Calculating -------------------------------------
after 1.188k (± 1.0%) i/s (841.62 μs/i) - 6.018k in 5.065355s
Comparison:
before: 1094.8 i/s
after: 1188.2 i/s - 1.09x faster
== Parsing citm_catalog.json (1727030 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
after 58.000 i/100ms
Calculating -------------------------------------
after 570.506 (± 3.7%) i/s (1.75 ms/i) - 2.900k in 5.091529s
Comparison:
before: 419.6 i/s
after: 570.5 i/s - 1.36x faster
== Parsing float parsing (2251051 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
after 22.000 i/100ms
Calculating -------------------------------------
after 212.010 (± 1.9%) i/s (4.72 ms/i) - 1.078k in 5.086885s
Comparison:
before: 189.4 i/s
after: 212.0 i/s - 1.12x faster
```
https://github.com/ruby/json/commit/b3fd7b26be
Co-Authored-By: Scott Myron <samyron@gmail.com>
|
|
|
|
|
|
Closes: https://github.com/ruby/json/pull/878
```
== Parsing float parsing (2251051 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
after 23.000 i/100ms
Calculating -------------------------------------
after 214.382 (± 0.5%) i/s (4.66 ms/i) - 1.081k in 5.042555s
Comparison:
before: 189.5 i/s
after: 214.4 i/s - 1.13x faster
```
https://github.com/ruby/json/commit/6348ff0891
Co-Authored-By: Scott Myron <samyron@gmail.com>
|
|
|
|
Split flushing NEWS and bumping up versions
|
|
https://github.com/ruby/json/commit/11f4e7b7be
|
|
https://github.com/ruby/json/commit/f0150e2944
|
|
Encapsulate pointer arithmetic to reduce possibility of mistakes.
https://github.com/ruby/json/commit/8b39407225
|
|
https://github.com/ruby/json/commit/1bf405ecc6
|
|
https://github.com/ruby/json/commit/2681b23b87
|
|
|
|
|
|
rb_obj_not_equal() uses rb_funcall(), so it's not `no_gc`, `leaf`, nor
`elidable`.
|
|
|
|
|
|
|
|
Just loop until you find a non-alias.
|
|
|
|
|
|
|
|
part 2
Commit https://github.com/ruby/json/commit/44df509dc2de fixed it for StandardError, but other exceptions and
jumps are also possible. Use rb_ensure() to release FBuffer instead of
rb_rescue().
A reproducer:
o = Object.new
def o.to_json(a) = throw :a
a = ["make heap allocation"*100, o]
10.times do
100_000.times do
catch(:a) { JSON(a) }
end
puts `ps -o rss= -p #{$$}`
end
https://github.com/ruby/json/commit/9b7b648ecd
|
|
|
|
|
|
Remove the code for Boyer-Moore-Horspool search.
Now we are using Sunday's quick search.
https://github.com/k-takata/Onigmo/commit/3d9072419a1578b742a422412d004fd8a54209fd
|
|
This fixes k-takata/Onigmo#120.
The commit k-takata/Onigmo@9c13de8d0684ebde97e3709d7693997c81ca374b was insufficient.
https://github.com/k-takata/Onigmo/commit/1de602ddff140d91419e3f86dd35c81d7bd2d8e7
|
|
Better fix for k-takata/Onigmo#107.
https://github.com/k-takata/Onigmo/commit/85393e4a63223b538529e7095255ce1153c09cff
|
|
* Multiplication result may overflow 'int' before it is converted to
'OnigDistance'.
* Comparison is always true because code <= 122.
* This statement makes ExprStmt unreachable.
* Empty block without comment
https://github.com/k-takata/Onigmo/commit/387ad616c3cb9370f99d2b11198c2135fa07030f
|
|
Fixes k-takata/Onigmo#92.
This fix was ported from oniguruma:
https://github.com/kkos/oniguruma/commit/257082dac8c6019198b56324012f0bd1830ff4ba
https://github.com/k-takata/Onigmo/commit/b1a5445fbeba97b3e94a733c2ce11c033453af73
|
|
This reverts commit 282338f88a8bf0807a7a1d21b06f78abe9de8fac.
It seems that the commit didn't improve the performance.
Revert it to fix k-takata/Onigmo#100.
https://github.com/k-takata/Onigmo/commit/cef834cb3a6e278fa252f52b704c65175a970ac0
|
|
E.g.
For the pattern `/----k/i`, optimization was totally turned off.
Make it possible to use the characters before `k` (i.e. `----`) for
optimization.
https://github.com/k-takata/Onigmo/commit/9c13de8d0684ebde97e3709d7693997c81ca374b
|
|
|
|
https://github.com/ruby/digest/commit/687e7cc1e1
|
|
|
|
https://github.com/ruby/win32-registry/commit/6d8a43a890
|
|
|
|
https://github.com/ruby/resolv/commit/31a393e96c
|