You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use the built-in character set conversions in Java for all string encoding and decoding. This works great for lots of character sets, but for ASCII it is quite pedantic in the way that it checks for valid and invalid characters. Native Node, on the other hand, appears to just lop off every byte and cast it directly to an ASCII character, with no validation.
Looking at benchmark results, Trireme suffers more than usual against Node when ASCII characters are used. We should see if implementing a "dumber" version of the ASCII character set from Java would speed these up and make them more compatible with native Node.
The text was updated successfully, but these errors were encountered:
Messed around with some microbenchmarks in Caliper and the built-in "ascii" encoding and decoding are quite a bit more efficient than what I can build myself.
Lots of string encoding and decoding in Trireme depends on careful handling of missing characters and partial multi-byte characters, so a simple swap to "getBytes" and "new String" is not going to be sufficient. However we switched a few obvious spots and will switch more as time goes on.
We use the built-in character set conversions in Java for all string encoding and decoding. This works great for lots of character sets, but for ASCII it is quite pedantic in the way that it checks for valid and invalid characters. Native Node, on the other hand, appears to just lop off every byte and cast it directly to an ASCII character, with no validation.
Looking at benchmark results, Trireme suffers more than usual against Node when ASCII characters are used. We should see if implementing a "dumber" version of the ASCII character set from Java would speed these up and make them more compatible with native Node.
The text was updated successfully, but these errors were encountered: