Current way to compare a and a_old in rgccak and sgccak can be very slow when blocks have a lot of variables.
This PR aims to provide a new implementation that scales better with the number of variables. Old and new implementations have been compared on 3 configurations:
Using microbenchmark, we get the following results:
1st config:
Unit: seconds
expr min mean median max neval
new 2.238619 2.4353 2.367956 2.753959 10
old 30.00891 30.3169 30.26584 30.94634 10
2nd config:
Unit: seconds
expr min mean median max neval
new 1.189144 1.279134 1.278469 1.379503 10
old 1.173425 1.243162 1.236418 1.324785 10
3rd config:
Unit: milliseconds
expr min mean median max neval
new 4.193016 4.991649 4.459408 88.17322 10000
old 4.307242 5.196242 4.741204 74.25639 10000
For not too big vectors, both implementations behave similarly (configs 2 and 3). For big vectors, new implementation is much faster than the old one (config 1).
Current way to compare
a
anda_old
in rgccak and sgccak can be very slow when blocks have a lot of variables. This PR aims to provide a new implementation that scales better with the number of variables. Old and new implementations have been compared on 3 configurations:Using
microbenchmark
, we get the following results:For not too big vectors, both implementations behave similarly (configs 2 and 3). For big vectors, new implementation is much faster than the old one (config 1).