summaryrefslogtreecommitdiff
path: root/spec/ruby/library/time/xmlschema_spec.rb
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2024-08-30 13:04:11 +0200
committerJean Boussier <[email protected]>2024-09-05 19:23:12 +0200
commit57e3fc32ea83e55d40f4cc6c3e437d485c506d34 (patch)
tree94ec6a5eb9f9e5a53715bf4dcd475f020fba29c7 /spec/ruby/library/time/xmlschema_spec.rb
parentd4de8aef374310d318b27c910f2fb562da170641 (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/library/time/xmlschema_spec.rb')
-rw-r--r--spec/ruby/library/time/xmlschema_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/library/time/xmlschema_spec.rb b/spec/ruby/library/time/xmlschema_spec.rb
index 4279311199..ff3c864a02 100644
--- a/spec/ruby/library/time/xmlschema_spec.rb
+++ b/spec/ruby/library/time/xmlschema_spec.rb
@@ -3,5 +3,5 @@ require_relative 'shared/xmlschema'
require 'time'
describe "Time.xmlschema" do
- it_behaves_like :time_xmlschema, :xmlschema
+ it_behaves_like :time_library_xmlschema, :xmlschema
end