deduplicate strings VM-wide in Ruby 2.5+
commit16f7018af1f278a9f0cc368e224258860ea4cb8c
authorEric Wong <e@80x24.org>
Thu, 6 Dec 2018 23:26:24 +0000 (6 23:26 +0000)
committerEric Wong <e@80x24.org>
Wed, 12 Dec 2018 23:49:38 +0000 (12 23:49 +0000)
tree3b4a7149d3f02220023e92a653ce53bdd2c0442b
parent981f561a726bb4307d01e4a09a308edba8d69fe3
deduplicate strings VM-wide in Ruby 2.5+

String#-@ deduplicates strings starting with Ruby 2.5.0
Hash#[]= deduplicates strings starting in Ruby 2.6.0-rc1

This allows us to save a small amount of memory by sharing
objects with other parts of the stack (e.g. Rack).
ext/unicorn_http/common_field_optimization.h
ext/unicorn_http/extconf.rb
test/unit/test_http_parser.rb