diff options
author | Lars Kanis <lars@greiz-reinsdorf.de> | 2015-03-21 21:52:35 +0100 |
---|---|---|
committer | Lars Kanis <lars@greiz-reinsdorf.de> | 2015-03-25 15:05:23 +0100 |
commit | 9f2f268666e2f5d861905f4740943c85ea70f76e (patch) | |
tree | 7c1f5a33704bdb5b6d503bb1d13a0cfdec170b95 /activerecord/test/active_record/connection_adapters | |
parent | 1d8d5a74b81b8aab1f5e6d233d509a92525ed4e1 (diff) | |
download | rails-9f2f268666e2f5d861905f4740943c85ea70f76e.tar.gz rails-9f2f268666e2f5d861905f4740943c85ea70f76e.tar.bz2 rails-9f2f268666e2f5d861905f4740943c85ea70f76e.zip |
PostgreSQL, Add input type casts for primitive types.
Ruby-pg's default way to serialize values for transmission to the database is to
call #to_s . This however creates a temporary String object for each value.
Setting a class based type map avoids the allocation of this additional String.
The performance benefit is measurable in microbenchmarks, but not with
the overhead of activerecord. However it's free to use and has no drawback.
Diffstat (limited to 'activerecord/test/active_record/connection_adapters')
0 files changed, 0 insertions, 0 deletions