diff options
author | Brent Eagles <brent@zeroc.com> | 2006-05-01 13:53:05 +0000 |
---|---|---|
committer | Brent Eagles <brent@zeroc.com> | 2006-05-01 13:53:05 +0000 |
commit | 77d149b3bc771c6edac9648ad07abb52869f5bc2 (patch) | |
tree | 35267e79309ac99b6e2e8feb208780912155d573 /cpp/src/Glacier2/ClientBlobject.cpp | |
parent | minor fix (diff) | |
download | ice-77d149b3bc771c6edac9648ad07abb52869f5bc2.tar.bz2 ice-77d149b3bc771c6edac9648ad07abb52869f5bc2.tar.xz ice-77d149b3bc771c6edac9648ad07abb52869f5bc2.zip |
Adding a note about performance of binary_search vs. regexec
Diffstat (limited to 'cpp/src/Glacier2/ClientBlobject.cpp')
-rw-r--r-- | cpp/src/Glacier2/ClientBlobject.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/Glacier2/ClientBlobject.cpp b/cpp/src/Glacier2/ClientBlobject.cpp index 6f91d3cd4cf..81bd8de0980 100644 --- a/cpp/src/Glacier2/ClientBlobject.cpp +++ b/cpp/src/Glacier2/ClientBlobject.cpp @@ -38,6 +38,14 @@ Glacier2::ClientBlobject::ice_invoke_async(const Ice::AMD_Array_Object_ice_invok // if(!_allowCategories.empty()) { + // + // Note: Some filtering will be relying on regular + // expressions. A quick performance test revealed that on Linux + // using the standard regular expression API to create an + // equivalent mechanism was much slower when there were a large + // number of categories. It would appear that the simple + // mechanism used here is a better choice, at least on Linux. + // if(!binary_search(_allowCategories.begin(), _allowCategories.end(), current.id.category)) { if(_rejectTraceLevel >= 1) |