Project

General

Profile

Actions

Patch #29363

closed

Use String#tr instead of String#gsub

Added by Go MAEDA over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

String#tr is more than 3 times faster than String#gsub when replacing a single character in a string with another single character.
https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code


Files

replace-gsub-with-tr.patch (3.86 KB) replace-gsub-with-tr.patch Go MAEDA, 2018-08-12 06:06
Actions #1

Updated by Go MAEDA over 5 years ago

  • Target version set to 4.1.0
Actions #2

Updated by Go MAEDA over 5 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed.

Actions #3

Updated by Go MAEDA over 5 years ago

  • Target version changed from 4.1.0 to 4.0.0
Actions

Also available in: Atom PDF