|
|
|
|
|
by chrisseaton
1534 days ago
|
|
> At this point with no practical difference between them Gah no! This isn't true! Even if you turn on frozen string literals comparing two strings is slower because they have to test for a non-frozen and non-interned string also happening to be the same. https://twitter.com/ChrisGSeaton/status/1514603665801109508 There's a pointer comparison, but behind it is on the failure side is a full-byte-comparison. Atrocious for cache even if the strings are tiny. If they aren't you're checking every byte! |
|