refactor: forbidden ccache and change static double for int
by zengli, no influence on others
This commit is contained in:
parent
2c5ef57fe4
commit
13204bcd3f
|
@ -132,7 +132,9 @@ Join::judge(int _smallest, int _biggest)
|
|||
//BETTER:how to guess the size of can_lists
|
||||
double size = (_smallest + _biggest) / 2.0;
|
||||
double ans = Join::PARAM_DENSE * dense - size / Join::PARAM_SIZE;
|
||||
if (ans > Join::JUDGE_LIMIT)
|
||||
double limit = 1.0 / (double)Join::JUDGE_LIMIT;
|
||||
//if (ans > Join::JUDGE_LIMIT)
|
||||
if (ans > limit)
|
||||
return 0; //multi_join method
|
||||
else
|
||||
return 1; //index_join method
|
||||
|
|
|
@ -55,8 +55,12 @@ private:
|
|||
static const unsigned PARAM_SIZE = 1000000;
|
||||
static const unsigned PARAM_PRE = 10000;
|
||||
static const unsigned PARAM_DENSE = 1;
|
||||
static const double JUDGE_LIMIT = 0.5;
|
||||
|
||||
//constexpr needed in C++11 (or in newer g++)
|
||||
//static const double JUDGE_LIMIT = 0.5;
|
||||
static const int JUDGE_LIMIT = 2; //use 1.0/JUDGE_LIMIT
|
||||
static const int LIMIT_CANDIDATE_LIST_SIZE = 1000;
|
||||
|
||||
//BETTER?:predefine size to avoid copy cost
|
||||
TableType current_table;
|
||||
TableIterator new_start; //keep to end() as default
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#CC=g++
|
||||
CC=ccache g++
|
||||
CC=g++
|
||||
#CC=ccache g++
|
||||
|
||||
example: CppAPIExample.o
|
||||
$(CC) -o example CppAPIExample.o -L../lib -lgstoreconnector
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#CC=g++
|
||||
CC=ccache g++
|
||||
CC=g++
|
||||
#CC=ccache g++
|
||||
|
||||
lib_dir=../lib/
|
||||
socket_obj_dir=../../../.objs/
|
||||
|
|
Loading…
Reference in New Issue