Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Improve perf of RubyRange.begLenInt

Aperta
#9,605 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java, ruby

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Ruby
Stelle
3.9k
Fork
951
Merge medio
1g 23h
PR unite (30g)
94

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jruby/jruby

Tutte le issue di jruby/jruby

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.