Skip to content

Simplify fixnum and string ranges#8176

Merged
headius merged 1 commit intojruby:9.5-devfrom
headius:range_fixnum_string_optz
Mar 30, 2024
Merged

Simplify fixnum and string ranges#8176
headius merged 1 commit intojruby:9.5-devfrom
headius:range_fixnum_string_optz

Conversation

@headius
Copy link
Member

@headius headius commented Mar 30, 2024

Fixnum and String ranges can be reduced in complexity by doing all of the construction in one go rather than each piece individually. A Range of fixnum..fixnum now uses indy to pass the long values to the bootstrap, avoiding bytecode to construct the fixnum objects. A Range of string..string embeds the bytelist and CR into the bootstrap parameters, for the same result. Both also have simplified forms in the non-indy JIT mode.

From ideas list in #7588.

Fixnum and String ranges can be reduced in complexity by doing
all of the construction in one go rather than each piece
individually. A Range of fixnum..fixnum now uses indy to pass the
long values to the bootstrap, avoiding bytecode to construct the
fixnum objects. A Range of string..string embeds the bytelist and
CR into the bootstrap parameters, for the same result. Both also
have simplified forms in the non-indy JIT mode.

From ideas list in jruby#7588.
@headius headius added this to the JRuby 10.0.0.0 milestone Mar 30, 2024
@headius headius mentioned this pull request Mar 30, 2024
22 tasks
@headius headius merged commit 1b4ad6d into jruby:9.5-dev Mar 30, 2024
@headius headius deleted the range_fixnum_string_optz branch March 30, 2024 02:23
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