Description
The attached patch speeds up CharSetUtils.squeeze() by avoiding unnecessary calls to CharSet.contains(). It should not slow down any cases, and in my tests with some use cases that I consider fairly common ones I got up to sixfold speedups with the patch.
It's not that squeeze() would be that slow in the first place before the patch; I just happened to be playing around with caliper (http://code.google.com/p/caliper/) and squeeze() was one of the first things I tried it with.