diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2024-08-30 13:04:11 +0200 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2024-09-05 19:23:12 +0200 |
| commit | 57e3fc32ea83e55d40f4cc6c3e437d485c506d34 (patch) | |
| tree | 94ec6a5eb9f9e5a53715bf4dcd475f020fba29c7 /spec/ruby/core/array/shared | |
| parent | d4de8aef374310d318b27c910f2fb562da170641 (diff) | |
Move Time#xmlschema in core and optimize it
[Feature #20707]
Converting Time into RFC3339 / ISO8601 representation is an significant
hotspot for applications that serialize data in JSON, XML or other formats.
By moving it into core we can optimize it much further than what `strftime` will
allow.
```
compare-ruby: ruby 3.4.0dev (2024-08-29T13:11:40Z master 6b08a50a62) +YJIT [arm64-darwin23]
built-ruby: ruby 3.4.0dev (2024-08-30T13:17:32Z native-xmlschema 34041ff71f) +YJIT [arm64-darwin23]
warming up......
| |compare-ruby|built-ruby|
|:-----------------------|-----------:|---------:|
|time.xmlschema | 1.087M| 5.190M|
| | -| 4.78x|
|utc_time.xmlschema | 1.464M| 6.848M|
| | -| 4.68x|
|time.xmlschema(6) | 859.960k| 4.646M|
| | -| 5.40x|
|utc_time.xmlschema(6) | 1.080M| 5.917M|
| | -| 5.48x|
|time.xmlschema(9) | 893.909k| 4.668M|
| | -| 5.22x|
|utc_time.xmlschema(9) | 1.056M| 5.707M|
| | -| 5.40x|
```
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11510
Diffstat (limited to 'spec/ruby/core/array/shared')
0 files changed, 0 insertions, 0 deletions
