diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-22 16:19:41 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-22 17:02:39 +0900 |
commit | 89b86640901be4f423cef4059d970c0aa0adb648 (patch) | |
tree | a4a08390a4fd3c969292bd50d2d2a03e370a27ae /activerecord/test/models/face.rb | |
parent | 02b5b8cb4357fe0eda3a5cc0afcfe3ff9f300806 (diff) | |
download | rails-89b86640901be4f423cef4059d970c0aa0adb648.tar.gz rails-89b86640901be4f423cef4059d970c0aa0adb648.tar.bz2 rails-89b86640901be4f423cef4059d970c0aa0adb648.zip |
Remove useless `set_value` / `get_value` helper methods
Those helper methods makes relation values access 15% slower.
https://gist.github.com/kamipo/e64439f7a206e1c5b5c69d92d982828e
Before (02b5b8cb):
```
Warming up --------------------------------------
#limit_value 237.074k i/100ms
#limit_value = 1 222.052k i/100ms
Calculating -------------------------------------
#limit_value 6.477M (± 2.9%) i/s - 32.479M in 5.019475s
#limit_value = 1 5.297M (± 4.3%) i/s - 26.424M in 4.999933s
```
After (this change):
```
Warming up --------------------------------------
#limit_value 261.109k i/100ms
#limit_value = 1 239.646k i/100ms
Calculating -------------------------------------
#limit_value 7.412M (± 1.6%) i/s - 37.077M in 5.003345s
#limit_value = 1 6.134M (± 1.0%) i/s - 30.675M in 5.000908s
```
Diffstat (limited to 'activerecord/test/models/face.rb')
0 files changed, 0 insertions, 0 deletions