]> www.ginac.de Git - cln.git/blob - src/TUNING
Replace CL_REQUIRE/CL_PROVIDE(cl_UP_unnamed) with portable code.
[cln.git] / src / TUNING
1 Tips for performance tuning on a specific architecture:
2
3 1a. Choose the optimal digit size (intDsize). This is fundamental. On 32-bit
4     platforms intDsize=32 is best. On 64-bit platforms intDsize=64 may be
5     better, especially if there is a 64x64-bit multiplication in hardware.
6
7 1b. Alternatively, tune GMP. When GMP is used, CLN's digit size (intDsize) has
8     to match GMP's limb size (sizeof(mp_limb_t)). There is nothing to do at the
9     CLN side: The configure script will take care of intDsize automatically.
10
11 2.  The break-even points between several algorithms for the same task
12     have to be determined experimentally, in the order given below:
13
14     multiplication:
15       cl_DS_mul.cc          karatsuba_threshold
16       cl_DS_mul.cc          function cl_fftm_suitable
17     division:
18       cl_DS_div.cc          function cl_recip_suitable
19     2-adic reciprocal:
20       cl_2DS_recip.cc       recip2adic_threshold
21     2-adic division:
22       cl_2DS_div.cc         function cl_recip_suitable
23     square root:
24       cl_DS_sqrt.cc         function cl_recipsqrt_suitable
25       cl_LF_sqrt.cc         "if (len > ...)"
26     gcd:
27       cl_I_gcd.cc           cl_gcd_double_threshold
28     binary->decimal conversion:
29       cl_I_to_digits.cc     cl_digits_div_threshold
30     pi:
31       cl_LF_pi.cc           best of 4 algorithms
32     exp, log:
33       cl_F_expx.cc          factor limit_slope of isqrt(d)
34       cl_R_exp.cc           inside function exp
35       cl_R_ln.cc            inside function ln
36     eulerconst:
37       cl_LF_eulerconst.cc   function compute_eulerconst
38     sin, cos, sinh, cosh:
39       cl_F_sinx.cc          factor limit_slope of isqrt(d)
40       cl_R_sin.cc           inside function sin
41       cl_R_cos.cc           inside function cos
42       cl_R_cossin.cc        inside function cl_cos_sin
43       cl_F_sinhx.cc         factor limit_slope of isqrt(d)
44       cl_R_sinh.cc          inside function sinh
45       cl_R_cosh.cc          inside function cosh
46       cl_R_coshsinh.cc      inside function cl_cosh_sinh
47       cl_F_atanx.cc         factor limit_slope of isqrt(d)
48       cl_F_atanx.cc         inside function atanx
49       cl_F_atanhx.cc        factor limit_slope of isqrt(d)
50       cl_F_atanhx.cc        inside function atanhx
51
52