Nobuyoshi Nakada
91d5db5505
[ruby/json] Use load
simd/conf.rb
...
When both extconf.rb of generator and parser are run in one process,
the second `require_relative` does nothing.
8e775320b7
2025-07-01 15:35:32 +09:00
Jean Boussier
bc334be4db
[ruby/json] Reduce duplication in extconf.rb
...
3ae3eeb9d3
2025-06-30 12:56:50 +09:00
Jean Boussier
d565d809af
[ruby/json] Release 2.12.2
...
a29cb77d52
2025-05-26 11:46:12 +09:00
Jean Boussier
212213a552
[ruby/json] fbuffer.c: add debug mode with bound checks.
...
This would have caught https://github.com/ruby/json/pull/808
on CI.
8109421fb4
2025-05-26 11:46:12 +09:00
Jean Boussier
de6e59e5ba
Sync ruby/json
...
Fix: https://github.com/ruby/json/issues/796
2025-05-01 10:06:04 +02:00
Jean Boussier
6ba0dc4d97
[ruby/json] Fix --with-static-linked-ext builds
...
d7d60cccb0
2025-04-30 08:12:41 +02:00
Jean Boussier
338adad8ba
[ruby/json] Fix i686 builds
...
We should test compilation with `-msse2` because we need to
test with whatever arguments Ruby will be compiled with.
0a871365db
2025-04-30 08:12:41 +02:00
Scott Myron
a3ec53bbb0
[ruby/json] Introduce ARM Neon and SSE2 SIMD.
...
(https://github.com/ruby/json/pull/743 )
See the pull request for the long development history: https://github.com/ruby/json/pull/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
```
49003523da
2025-04-30 08:12:41 +02:00
Jean Boussier
a052d96103
[ruby/json] Compile with std=c99
...
d4968d2e48
2024-10-26 18:44:15 +09:00
Benoit Daloze
9c4a28b826
[flori/json] Use the pure-Ruby generator on TruffleRuby as it is much faster
...
* Using the benchmark from https://github.com/flori/json/pull/580
$ ruby benchmarks/bench.rb dump pure
JSON::Pure::Generator
truffleruby 24.0.0, like ruby 3.2.2, Oracle GraalVM Native [x86_64-linux]
Warming up --------------------------------------
JSON.dump(obj) 116.000 i/100ms
JSON.dump(obj) 235.000 i/100ms
JSON.dump(obj) 317.000 i/100ms
JSON.dump(obj) 372.000 i/100ms
JSON.dump(obj) 374.000 i/100ms
Calculating -------------------------------------
JSON.dump(obj) 3.735k (± 0.9%) i/s (267.76 μs/i) - 18.700k in 5.007526s
JSON.dump(obj) 3.738k (± 0.7%) i/s (267.49 μs/i) - 18.700k in 5.002252s
JSON.dump(obj) 3.743k (± 0.7%) i/s (267.18 μs/i) - 19.074k in 5.096375s
JSON.dump(obj) 3.747k (± 0.5%) i/s (266.87 μs/i) - 19.074k in 5.090463s
JSON.dump(obj) 3.746k (± 0.5%) i/s (266.96 μs/i) - 19.074k in 5.092069s
$ ruby benchmarks/bench.rb dump ext
JSON::Ext::Generator
truffleruby 24.0.0, like ruby 3.2.2, Oracle GraalVM Native [x86_64-linux]
Warming up --------------------------------------
JSON.dump(obj) 19.000 i/100ms
JSON.dump(obj) 18.000 i/100ms
JSON.dump(obj) 18.000 i/100ms
JSON.dump(obj) 18.000 i/100ms
JSON.dump(obj) 21.000 i/100ms
Calculating -------------------------------------
JSON.dump(obj) 221.260 (±10.8%) i/s (4.52 ms/i) - 1.092k in 5.004381s
JSON.dump(obj) 221.983 (± 8.1%) i/s (4.50 ms/i) - 1.113k in 5.055574s
JSON.dump(obj) 221.446 (± 8.6%) i/s (4.52 ms/i) - 1.113k in 5.073167s
JSON.dump(obj) 226.452 (± 7.9%) i/s (4.42 ms/i) - 1.134k in 5.048568s
JSON.dump(obj) 227.795 (± 8.3%) i/s (4.39 ms/i) - 1.134k in 5.025187s
8256455cdc
2024-06-04 14:44:43 +09:00
hsbt
bf7cc652ae
* ext/json/**/*.rb: merge original files from upstream repository.
...
It only fixes styles of frozen string literal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-14 03:48:54 +00:00
naruse
c4fdfabcc8
handle ext/ as r53141
...
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts
fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&#
frozen_string_literal: false\n");f.rewind;f.write s}}'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:31:54 +00:00
hsbt
2e4f0af00f
* ext/json/*, test/json/*: Reverted r50231. Because it's not works with
...
cross-compile environment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 08:36:37 +00:00
hsbt
cfaddc2a32
* ext/json/*, test/json/*, defs/default_gems: Gemify JSON library.
...
[fix GH-867][Feature #11057 ]
* test/ruby/test_extlibs.rb: removed json gem from existence extentions.
* gems/bundled_gems: added json gem into bundled gem.
* lib/rdoc/rubygems_hook.rb: ignored no json environment.
* lib/rubygems/test_case.rb, test/rubygems/*: ditto.
* lib/rdoc/test_case.rb, test/rdoc/*: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11 11:14:36 +00:00
naruse
5a00be2bf7
* ext/json: Merge JSON 1.7.1.
...
e5b9a9465c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 16:00:49 +00:00
naruse
4d8d3184d1
* ext/json: Merge 164a75c8bd2007d32c4d7665d53140d8fc126dcd.
...
[ruby-core:41917] [Bug #5846 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-11 13:36:06 +00:00
naruse
6d74458037
* ext/json/generator/extconf.rb: remove the lines which set -O3
...
when -O option is not set.
Note that -O3 doesn't always exist.
* ext/json/parser/extconf.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-02 01:12:41 +00:00
naruse
4a84c27e3e
* ext/json: Update github/flori/json from 1.4.2+ to
...
e22b2f2bdfe6a9b0. this fixes some bugs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-01 16:26:13 +00:00
naruse
3642494ce5
Recommit of JSON; fix mixed declarations.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26 06:27:27 +00:00
usa
27be3056dc
* ext/jason: revert r27493. came again after canceling gcc-ism.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26 04:34:36 +00:00
naruse
54592ad627
* ext/json: Update to JSON 1.4.1.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26 00:06:35 +00:00