Skip to content

Commit

Permalink
GDV-31:[C++][Travis]Perf Improvments (apache#82)
Browse files Browse the repository at this point in the history
1. In evaluate to lookup module, first do without lock and fallback only if
   module is not found.
2. Use release builds in travis.
  • Loading branch information
praveenbingo committed Sep 10, 2018
1 parent 97b44d3 commit 66425c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cpp/src/gandiva/jni/id_to_module_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ class IdToModuleMap {

HOLDER Lookup(jlong module_id) {
HOLDER result = nullptr;
try {
result = map_.at(module_id);
} catch (const std::out_of_range &e) {
}
if (result != nullptr) {
return result;
}
mtx_.lock();
try {
result = map_.at(module_id);
Expand Down

0 comments on commit 66425c0

Please sign in to comment.