summaryrefslogtreecommitdiffstats
path: root/core/qthelper.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-05-05 22:24:50 +0200
committerGravatar Robert C. Helling <helling@atdotde.de>2020-05-06 00:22:31 +0200
commit123937901fe9c35fcb1be471fb6ad8a9f89f1b1d (patch)
tree475940d30ac8830063e9053d52b308dfd6cf48b6 /core/qthelper.h
parentf37f42876260e804e4e990d608a8dcd21a141ba0 (diff)
downloadsubsurface-123937901fe9c35fcb1be471fb6ad8a9f89f1b1d.tar.gz
planner: remove Bühlmann factor cache
The Bühlmann factors were cached in a thread-safe hashmap. It seemed somewhat dubious that entering a critical section and doing a hash-lookup would be significantly faster than a simple exp() call. Indeed, in a very cache friendly test (16 entries, tight loop) calling the factor() function 32 000 000 times from a different translation units we get: - with cache: 604 ms - without cache: 266 ms Therefore, remove the cache. Given that 32 000 000 calls take only 266 ms, it appears not sensible to try to optimize this function anyway. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/qthelper.h')
-rw-r--r--core/qthelper.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/core/qthelper.h b/core/qthelper.h
index 4a7d8ec52..0f3dd9c1b 100644
--- a/core/qthelper.h
+++ b/core/qthelper.h
@@ -146,8 +146,6 @@ const char *subsurface_user_agent();
enum deco_mode decoMode();
int parse_seabear_header(const char *filename, char **params, int pnr);
char *get_current_date();
-double cache_value(int tissue, int timestep, enum inertgas gas);
-void cache_insert(int tissue, int timestep, enum inertgas gas, double value);
void print_qt_versions();
void lock_planner();
void unlock_planner();