mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
497e52f8c2
Currently, if `:datetime` type has a precision, type casting always does round off subseconds regardless of whether necessary or not, it is a bit slow. Since #34970, `t.timestamps` with `precision: 6` by default, so `pluck(:created_at)` in newly created app will always be affected by the round off. This avoids the round off if possible, it makes `pluck(:created_at)` about 25% faster. https://gist.github.com/kamipo/e029539f2632aee9f5e711fe66fc8842 Before ( |
||
---|---|---|
.. | ||
active_model | ||
active_model.rb |