Jean Boussier e52b47680e [ruby/json] Reduce encoding benchmark size
Profiling revealed that we were spending lots of time growing the buffer.
Buffer operations is definitely something we want to optimize, but for
this specific benchmark what we're interested in is UTF-8 scanning performance.

Each iteration of the two scaning benchmark were producing 20MB of JSON,
now they only produce 5MB.

Now:

```
== Encoding mostly utf8 (5001001 bytes)
ruby 3.4.0dev (2024-10-18T19:01:45Z master https://github.com/ruby/json/commit/7be9a333ca) +YJIT +PRISM [arm64-darwin23]
Warming up --------------------------------------
                json    35.000 i/100ms
                  oj    36.000 i/100ms
           rapidjson    10.000 i/100ms
Calculating -------------------------------------
                json    359.161 (± 1.4%) i/s    (2.78 ms/i) -      1.820k in   5.068542s
                  oj    359.699 (± 0.6%) i/s    (2.78 ms/i) -      1.800k in   5.004291s
           rapidjson     99.687 (± 2.0%) i/s   (10.03 ms/i) -    500.000 in   5.017321s

Comparison:
                json:      359.2 i/s
                  oj:      359.7 i/s - same-ish: difference falls within error
           rapidjson:       99.7 i/s - 3.60x  slower
```

https://github.com/ruby/json/commit/1a338532d2
2024-10-26 18:44:15 +09:00
2024-10-17 21:36:43 +00:00
2024-10-24 16:08:46 +01:00
2024-10-26 18:44:15 +09:00
2024-10-16 15:56:01 +00:00
2024-09-18 21:03:48 +09:00
2024-06-04 12:40:08 +09:00
2024-10-25 10:52:22 -04:00
2024-10-16 14:12:06 -04:00
2024-09-30 18:04:41 +09:00
2024-09-19 10:14:17 -07:00
2024-10-24 16:08:46 +01:00
2024-10-07 20:12:57 -04:00
2024-10-23 23:02:15 +09:00
2024-10-25 20:52:32 +09:00
2024-09-20 19:26:37 +09:00
2024-09-19 12:10:27 -04:00
2024-09-08 23:40:18 +09:00
GPL
2024-10-03 18:47:09 +09:00
2024-09-26 20:01:20 +09:00
2024-10-25 17:46:49 -07:00
2024-10-02 17:07:46 +09:00
2024-07-20 11:25:26 +09:00
2024-10-03 21:20:09 +01:00
2024-10-25 22:26:29 +09:00
2024-09-17 12:46:01 +09:00
2024-10-24 16:08:46 +01:00
2024-10-09 07:14:44 +09:00
2024-09-25 10:40:14 +09:00
2024-10-03 21:20:09 +01:00
2024-10-25 22:32:38 +09:00
2024-10-25 22:32:38 +09:00
2024-10-03 21:20:09 +01:00
2024-10-03 21:20:09 +01:00
2024-10-20 19:33:21 +09:00
2024-10-09 07:14:44 +09:00
2024-10-22 17:27:20 +11:00
2024-09-26 17:53:21 +09:00
2024-10-11 16:52:01 +09:00
2024-07-05 21:20:54 +09:00
2024-10-25 17:46:49 -07:00
2024-10-17 21:36:43 +00:00

Actions Status: MinGW Actions Status: RJIT Actions Status: Ubuntu Actions Status: Windows Travis Status

What is Ruby?

Ruby is an interpreted object-oriented programming language often used for web development. It also offers many scripting features to process plain text and serialized files, or manage system tasks. It is simple, straightforward, and extensible.

Features of Ruby

  • Simple Syntax
  • Normal Object-oriented Features (e.g. class, method calls)
  • Advanced Object-oriented Features (e.g. mix-in, singleton-method)
  • Operator Overloading
  • Exception Handling
  • Iterators and Closures
  • Garbage Collection
  • Dynamic Loading of Object Files (on some architectures)
  • Highly Portable (works on many Unix-like/POSIX compatible platforms as well as Windows, macOS, etc.) cf. https://docs.ruby-lang.org/en/master/maintainers_md.html#label-Platform+Maintainers

How to get Ruby

For a complete list of ways to install Ruby, including using third-party tools like rvm, see:

https://www.ruby-lang.org/en/downloads/

You can download release packages and the snapshot of the repository. If you want to download whole versions of Ruby, please visit https://www.ruby-lang.org/en/downloads/releases/.

Download with Git

The mirror of the Ruby source tree can be checked out with the following command:

$ git clone https://github.com/ruby/ruby.git

There are some other branches under development. Try the following command to see the list of branches:

$ git ls-remote https://github.com/ruby/ruby.git

You may also want to use https://git.ruby-lang.org/ruby.git (actual master of Ruby source) if you are a committer.

How to build

See Building Ruby

Ruby home page

https://www.ruby-lang.org/

Documentation

Mailing list

There is a mailing list to discuss Ruby. To subscribe to this list, please send the following phrase:

join

in the mail subject (not body) to the address ruby-talk-request@ml.ruby-lang.org.

Copying

See the file COPYING.

Feedback

Questions about the Ruby language can be asked on the Ruby-Talk mailing list or on websites like https://stackoverflow.com.

Bugs should be reported at https://bugs.ruby-lang.org. Read "Reporting Issues" for more information.

Contributing

See "Contributing to Ruby", which includes setup and build instructions.

The Author

Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in 1995.

matz@ruby-lang.org

Description
Languages
Ruby 58.9%
C 29.5%
Rust 6.1%
C++ 2.9%
Yacc 0.9%
Other 1.6%