Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Improve perf of RubyRange.begLenInt

オープン
#9,605 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java, ruby

調査の方向性

The issue names RubyRange.begLenInt and its callers in String and Array slicing, but no source files or tests. Start by locating the method and its call sites, then inspect relevant slicing tests and benchmark coverage. Compare the allocation-free approaches mentioned in the issue; done means preserving begin/length behavior while reducing the extra allocation on the hot path.

索引モデルが issue の本文から書いたものです。

説明

core performance

The begLenInt method in RubyRange returns the coerced begin and length as an int[2]. This is an extra allocation that could be eliminate by simply packing both values into a long as ((long) begin << 32) | length, or it could be turned into a record that can eventually become a value object and allocation-free.

This method is used for some common slicing methods in String and Array and eliminating the extra allocation could improve code on that hot path.

主要言語
Ruby
スター
3.9k
フォーク
951
平均マージ
2日 2時間
マージ済み PR(30日)
97

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jruby/jruby のほかの issue

jruby/jruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。