PDF call vs. a formula
ratio=2.32/1.81=1.28 30% slower
CDF call vs. probnorm call
ratio=3.77/1.62=2.33 133% slower.
2431 data _null_;
2432 do i=1 to 1e7;
2433 x=rannor(123);
2434 pdf=pdf('normal',x);
2435 * pdf2=1/sqrt(2*constant('pi'))*exp(-x**2/2);
2436 /* put pdf= pdf2=;*/
2437 end;
2438 run;
NOTE: DATA statement used (Total process time):
real time 2.35 seconds
cpu time 2.32 seconds
2439
2440 data _null_;
2441 do i=1 to 1e7;
2442 x=rannor(123);
2443 *pdf=pdf('normal',x);
2444 pdf2=1/sqrt(2*constant('pi'))*exp(-x**2/2);
2445 /* put pdf= pdf2=;*/
2446 end;
2447 run;
NOTE: DATA statement used (Total process time):
real time 1.81 seconds
cpu time 1.81 seconds
2448
2449 data _null_;
2450 do i=1 to 1e7;
2451 x=rannor(123);
2452 cdf=cdf('normal',x);
2453 /* cdf2=probnorm(x);*/
2454 /* put cdf= cdf2=;*/
2455 end;
2456 run;
NOTE: DATA statement used (Total process time):
real time 3.78 seconds
cpu time 3.77 seconds
2457
2458
2459 data _null_;
2460 do i=1 to 1e7;
2461 x=rannor(123);
2462 * cdf=cdf('normal',x);
2463 cdf2=probnorm(x);
2464 /* put cdf= cdf2=;*/
2465 end;
2466 run;
NOTE: DATA statement used (Total process time):
real time 1.63 seconds
cpu time 1.62 seconds



雷达卡



京公网安备 11010802022788号







