Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
you are absolutely correct, using a pattern as static variable is about 3-4 times faster.
Correct me if I'm wrong but isn't this solution kind of inneficient in terms of performance in a high concurrency scenario??
The thing is that everytime you invoke String.matches it has to compile the regex before evaluating the String. If you compile
the regular expression in advance using an static variable with Pattern.compile() it will perform way better than this solution.
Isn't it?
Regards.