Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Get time with a specific detail
PostPosted: Wed Sep 22, 2010 2:28 pm 

Joined: Tue Jul 06, 2010 8:52 am
Posts: 2
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Get time with a specific detail
PostPosted: Thu Sep 23, 2010 7:45 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

It is currently Fri May 13, 2022 11:07 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group