Skip to content

Fix Time.xmlschema handling leading and trailing whitespaces#70

Merged
byroot merged 1 commit into
ruby:masterfrom
byroot:xmlschema-spaces
Jul 20, 2026
Merged

Fix Time.xmlschema handling leading and trailing whitespaces#70
byroot merged 1 commit into
ruby:masterfrom
byroot:xmlschema-spaces

Conversation

@byroot

@byroot byroot commented Jul 20, 2026

Copy link
Copy Markdown
Member

Followup: #66

This reduce the gain to only ~3.8x instead of ~4x, but still worth it.

2026-07-20 08:37:09.66407 +0200
2026-07-20 08:37:09.66407 +0200
ruby 4.0.5 (2026-05-20 revision 64336ffd0e) +YJIT +PRISM [arm64-darwin25]
Warming up --------------------------------------
           xmlschema    68.139k i/100ms
            Time.new   510.172k i/100ms
                 opt   239.558k i/100ms
Calculating -------------------------------------
           xmlschema    667.174k (± 1.4%) i/s    (1.50 μs/i) -      3.339M in   5.004405s
            Time.new      5.539M (± 1.3%) i/s  (180.53 ns/i) -     28.059M in   5.065670s
                 opt      2.538M (± 0.7%) i/s  (394.01 ns/i) -     12.697M in   5.002588s

Comparison:
xmlschema:   667174.4 i/s
 Time.new:  5539140.9 i/s - 8.30x  faster
      opt:  2538001.1 i/s - 3.80x  faster

@byroot
byroot requested a review from nobu July 20, 2026 06:38
@byroot
byroot merged commit c6d5a83 into ruby:master Jul 20, 2026
19 checks passed
@byroot
byroot deleted the xmlschema-spaces branch July 20, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant