Eliminate transient objects for looking up symbol by bytelist #5512
The old logic constructed an intermediate java.lang.String and
The logic here should match what an ISO8859_1 Java String would
For the profiled run in question, the only ISO8859_1 decoders in the process were created by the old logic:
The old logic constructed an intermediate java.lang.String and called hashCode, which in turn created an ISO8859_1 decoder and buffers to do the decoding. This showed up in heap profiles of the state_machine library, but would generically affect any case where a Ruby String was used to retrieve a Ruby Symbol. The logic here should match what an ISO8859_1 Java String would do. The accompanying tests makes sure this is so.
Good improvement from this...here's before and after: