summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2019-03-22 15:52:16 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2019-03-22 15:52:16 -0700
commit97046b265c489b7603143bd94bfc76ba6d7aef04 (patch)
tree3f45ad1158f000b9e7d18f03af2664f8e3fbf559
parent2966eac64f549bb5f5f79ddace14dd0bc59c3270 (diff)
downloadinfinitytier-97046b265c489b7603143bd94bfc76ba6d7aef04.tar.gz
infinitytier-97046b265c489b7603143bd94bfc76ba6d7aef04.zip
Kill ZT_FAST_MEMCPY in selftest.
-rw-r--r--selftest.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/selftest.cpp b/selftest.cpp
index bc7b5371..77c06cc0 100644
--- a/selftest.cpp
+++ b/selftest.cpp
@@ -670,52 +670,6 @@ static int testOther()
std::cout << std::endl;
#if 0
- std::cout << "[other] Benchmarking memcpy... "; std::cout.flush();
- {
- unsigned char *bb = (unsigned char *)::malloc(1234567);
- unsigned char *cc = (unsigned char *)::malloc(1234567);
- for(unsigned int i=0;i<1234567;++i)
- bb[i] = (unsigned char)i;
- double bytes = 0.0;
- uint64_t start = OSUtils::now();
- for(unsigned int i=0;i<20000;++i) {
- ++bb[i];
- ++bb[i+1];
- memcpy(cc,bb,1234567);
- bytes += 1234567.0;
- }
- if (cc[0] != bb[0])
- abort();
- uint64_t end = OSUtils::now();
- std::cout << ((bytes / 1048576.0) / ((long double)(end - start) / 1024.0)) << " MiB/second" << std::endl;
- ::free((void *)bb);
- ::free((void *)cc);
- }
-#endif
-
- std::cout << "[other] Benchmarking ZT_FAST_MEMCPY... "; std::cout.flush();
- {
- unsigned char *bb = (unsigned char *)::malloc(1234567);
- unsigned char *cc = (unsigned char *)::malloc(1234567);
- for(unsigned int i=0;i<1234567;++i)
- bb[i] = (unsigned char)i;
- double bytes = 0.0;
- uint64_t start = OSUtils::now();
- for(unsigned int i=0;i<20000;++i) {
- ++bb[0];
- ++bb[1234566];
- ZT_FAST_MEMCPY(cc,bb,1234567);
- bytes += 1234567.0;
- }
- if (cc[0] != bb[0])
- abort();
- uint64_t end = OSUtils::now();
- std::cout << ((bytes / 1048576.0) / ((long double)(end - start) / 1024.0)) << " MiB/second" << std::endl;
- ::free((void *)bb);
- ::free((void *)cc);
- }
-
-#if 0
std::cout << "[other] Testing Hashtable... "; std::cout.flush();
{
Hashtable<uint64_t,std::string> ht;