Hi

Am 14.03.2014 um 11:56 schrieb Bertrand Delacretaz <bdelacre...@apache.org>:

> Hi,
> 
> On Fri, Mar 14, 2014 at 11:51 AM, Felix Meschberger <fmesc...@adobe.com> 
> wrote:
>> ...I have the impression using a regular expression to replace a single
>> character with another character is overkill and replacing this code
>> with a simple "String.replace(':', '/')" might be more appropriate....
> 
> If that's covered by tests, and those tests handle the case where
> there are several colons in a resource type (which is legal, right?)

Right. I created the test and the method works, indeed (as documented by 
String.replace() ;-) )

> and your measurements show significantly better performance, why not
> ;-)

Hehe, just for the fun of it created a stupid microbenchmark indicating the 
char String.replace(char, char) based implementation to be almost 6x times 
faster than the old one ;-)

Regards
Felix

Reply via email to