-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made the mem_cache_block lockfree #23
Conversation
This *significantly* improves parallel performance of regex. Currently if I have a large number of threads all using regexes; even if they are using idependent regex objects, performance is still extremely poor due to the lock inside of the mem_block_cache.
This is a good idea, but the patch isn't completely portable just yet. For preference I would like a solution which:
|
sounds good. I will update the pull request. |
I have updated with the suggested checks. |
@@ -19,17 +19,72 @@ | |||
#define BOOST_REGEX_V4_MEM_BLOCK_CACHE_HPP | |||
|
|||
#include <new> | |||
#ifdef BOOST_HAS_THREADS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This include is still needed when neither not <boost/atomic.hpp> provide the functionality we require.
Sorry for the delay. I have updated the pull request with the fixes. |
I'm also backlogged, will get to this shortly, John. |
Many thanks for this! |
This significantly improves parallel performance of regex.
Currently if I have a large number of threads all using regexes; even if
they are using idependent regex objects, performance is still extremely poor
due to the lock inside of the mem_block_cache.