gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 72/164: Performance chech


From: gnunet
Subject: [gnunet] 72/164: Performance chech
Date: Fri, 30 Jul 2021 15:32:18 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit c45403590dbc18d15cc0415540ddee4755dd856a
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Thu Apr 29 00:49:08 2021 +0200

    Performance chech
---
 src/setu/gnunet-service-setu.c | 2 +-
 src/setu/ibf.c                 | 8 ++------
 src/setu/perf_setu_api.c       | 6 +-----
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index d029838d7..3475220e7 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -63,7 +63,7 @@
 /**
  * Number of buckets that can be transmitted in one message.
  */
-#define MAX_BUCKETS_PER_MESSAGE ((1 << 15) / IBF_BUCKET_SIZE)
+#define MAX_BUCKETS_PER_MESSAGE ((1 << 16) / IBF_BUCKET_SIZE)
 
 /**
  * The maximum size of an ibf we use is MAX_IBF_SIZE=2^20.
diff --git a/src/setu/ibf.c b/src/setu/ibf.c
index 68757ce61..08ee1dd39 100644
--- a/src/setu/ibf.c
+++ b/src/setu/ibf.c
@@ -306,17 +306,13 @@ ibf_decode (struct InvertibleBloomFilter *ibf,
 uint8_t
 ibf_get_max_counter (struct InvertibleBloomFilter *ibf)
     {
-    uint64_t max_counter=0;
+    long long max_counter=0;
     for (uint64_t i = 0; i < ibf->size; i++) {
         if(ibf->count[i].count_val > max_counter){
             max_counter=ibf->count[i].count_val;
         }
     }
-        LOG (GNUNET_ERROR_TYPE_ERROR,
-             "max_counter: %016X OLD: %f NEW: %u NEW_INT %u \n", max_counter, 
floor(log2(max_counter)) + 1, 32 -__builtin_clz(max_counter));
-
-    return floor(log2(max_counter)) + 1;
-
+    return 64 - __builtin_clzll(max_counter);
 }
 
 /**
diff --git a/src/setu/perf_setu_api.c b/src/setu/perf_setu_api.c
index 7d605e42e..d121ae970 100644
--- a/src/setu/perf_setu_api.c
+++ b/src/setu/perf_setu_api.c
@@ -404,7 +404,7 @@ run (void *cls,
                 "Running real set-reconciliation\n");
     //init_set1 ();
     // limit ~23800 element total
-    initRandomSets(4998, 5000,5000,32);
+    initRandomSets(4990, 5000,5000,32);
 }
 
 void perf_thread() {
@@ -425,9 +425,6 @@ static void run_petf_thread(int total_runs) {
 //Father code (before child processes start)
     for (int processed = 0; processed < total_runs;) {
         for (int id = 0; id < core_count; id++) {
-            perf_thread();
-        }
-            /**
             if(processed >= total_runs) break;
 
             if ((child_pid = fork()) == 0) {
@@ -437,7 +434,6 @@ static void run_petf_thread(int total_runs) {
             processed += 1;
         }
         while ((wpid = wait(&status)) > 0);
-             **/
     }
 }
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]