Singular
https://www.singular.uni-kl.de/forum/

Get time with a specific detail
https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=1859
Page 1 of 1

Author:  rmaestre [ Wed Sep 22, 2010 2:28 pm ]
Post subject:  Get time with a specific detail

Hello everyone!
I am testing/benchmarking codes between polybori and Singular.

In polybori (via phyton) i use the follow code to get calculation time:
Code:
a=time.time();
groebner_basis([p1,p2,p3]);
print time.time()-a;

and i get in the output: 0.000234 for example. This result is ok.

In Singular i use:
Code:
int t=0;
timer=0;
system("--ticks-per-sec","10000");
t=timer;
ideal BASE=slimgb([p1,p2,p3]);
print(timer-t);

and i get: 100, sometimes 200, sometimes 0 .......

How could I get a higher accuracy in reading?
What is the greatest precision?


Thank you very much.
Best regards.

Author:  hannes [ Thu Sep 23, 2010 7:45 pm ]
Post subject:  Re: Get time with a specific detail

timer in Singular uses getrusage, converts it to 1/00 1/s and than adapts it
to your setting of ticks-per-sec.
That means the maximal precision is 0.01 seconds.
But remember that on multi-process systems all timings below 0.5 seconds
are not reliable.

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/