From 46e39e6a6e188ef80286f7dff7033b46c1c748e5 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 13 Sep 2018 11:40:56 +0200 Subject: [PATCH] Removed statistics in BitVectorHashmap which were only used for debugging purposes --- src/storm/storage/BitVectorHashMap.cpp | 23 ----------------------- src/storm/storage/BitVectorHashMap.h | 7 ------- 2 files changed, 30 deletions(-) diff --git a/src/storm/storage/BitVectorHashMap.cpp b/src/storm/storage/BitVectorHashMap.cpp index 67c151bde..25b0b5791 100644 --- a/src/storm/storage/BitVectorHashMap.cpp +++ b/src/storm/storage/BitVectorHashMap.cpp @@ -54,13 +54,6 @@ namespace storm { buckets = storm::storage::BitVector(bucketSize * (1ull << currentSize)); occupied = storm::storage::BitVector(1ull << currentSize); values = std::vector(1ull << currentSize); - -#ifndef NDEBUG - numberOfInsertions = 0; - numberOfInsertionProbingSteps = 0; - numberOfFinds = 0; - numberOfFindProbingSteps = 0; -#endif } template @@ -81,11 +74,7 @@ namespace storm { template void BitVectorHashMap::increaseSize() { ++currentSize; -#ifndef NDEBUG - STORM_LOG_TRACE("Increasing size of hash map from " << (1ull << (currentSize - 1)) << " to " << (1ull << currentSize) << ". Stats: " << numberOfFinds << " finds (avg. " << (numberOfFindProbingSteps / static_cast(numberOfFinds)) << " probing steps), " << numberOfInsertions << " insertions (avg. " << (numberOfInsertionProbingSteps / static_cast(numberOfInsertions)) << " probing steps)."); -#else STORM_LOG_TRACE("Increasing size of hash map from " << (1ull << (currentSize - 1)) << " to " << (1ull << currentSize) << "."); -#endif // Create new containers and swap them with the old ones. storm::storage::BitVector oldBuckets(bucketSize * (1ull << currentSize)); @@ -170,15 +159,9 @@ namespace storm { template std::pair BitVectorHashMap::findBucket(storm::storage::BitVector const& key) const { -#ifndef NDEBUG - ++numberOfFinds; -#endif uint64_t bucket = hasher(key) >> this->getCurrentShiftWidth(); while (isBucketOccupied(bucket)) { -#ifndef NDEBUG - ++numberOfFindProbingSteps; -#endif if (buckets.matches(bucket * bucketSize, key)) { return std::make_pair(true, bucket); } @@ -193,15 +176,9 @@ namespace storm { template std::pair BitVectorHashMap::findBucketToInsert(storm::storage::BitVector const& key) { -#ifndef NDEBUG - ++numberOfInsertions; -#endif uint64_t bucket = hasher(key) >> this->getCurrentShiftWidth(); while (isBucketOccupied(bucket)) { -#ifndef NDEBUG - ++numberOfInsertionProbingSteps; -#endif if (buckets.matches(bucket * bucketSize, key)) { return std::make_pair(true, bucket); } diff --git a/src/storm/storage/BitVectorHashMap.h b/src/storm/storage/BitVectorHashMap.h index 38310aa4f..db1b659d1 100644 --- a/src/storm/storage/BitVectorHashMap.h +++ b/src/storm/storage/BitVectorHashMap.h @@ -234,13 +234,6 @@ namespace storm { // Functor object that are used to perform the actual hashing. Hash hasher; -#ifndef NDEBUG - // Some performance metrics. - mutable uint64_t numberOfInsertions; - mutable uint64_t numberOfInsertionProbingSteps; - mutable uint64_t numberOfFinds; - mutable uint64_t numberOfFindProbingSteps; -#endif }; }