Unsafe might be similarly tricky dependency-wise, but perhaps less so. Either
solution might work fine if we extract the code for encoding to a utility class
that isn’t initialized eagerly with String.class itself.
I’ll file an RFE and get the ”trivial” fix to use StringCoding.countPositives
in
Thanks for taking a look at this.
That is a pretty good improvement with a much smaller change.
I recognize the intricacies of bootstrapping, but have no expertise. Would
using Unsafe directly be easier? Particularly for shorter strings, doing
the copying and checking together rather than as separa
Hi,
general comment: String might be one of the trickier places to add a VarHandle
dependency, since String is used very early in the bootstrap and depended upon
by everything else, so I’d expect such a solution would have to navigate
potential circularity issues carefully. It’d be good to expe