Skip to content

Improved performance of preconditions on strings #73

Merged
merged 1 commit into from Oct 23, 2011

3 participants

@mkneissl

Replaced !regex.unapplySeq.isEmpty by regex.pattern.matcher(_).matches.

This avoids a lot of allocations of unneeded objects and improves the
overall performance on Android by a factor of 2-3 (for my use case).

@mkneissl mkneissl Improved performance of preconditions on strings.
Replaced !regex.unapplySeq.isEmpty by regex.pattern.matcher(_).matches.

This avoids a lot of allocations of unneeded objects and improves the 
overall performance on Android by a factor of 2-3 (for my use case).
d9975e4
@josharnold52

Nice! Even on my notebook, this improves the times of the "load" performance tests by at least 20%.

@djspiewak djspiewak merged commit d9975e4 into djspiewak:master Oct 23, 2011
@djspiewak
Owner

Awesome! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.