Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - Timings in Singular
Author Message
  Post subject:   Reply with quote
There is a timer functionality in Singular. You can use it in the
following way:

Code:
> int t=timer;          // t saves the value of the timer at the beginning
> ......
> timer-t;              // elapsed time is timer minus saved timer value


Alternatively, you may use the timer as in the following example:

Code:
> system("--min-time", "0.001");
> timer=1;
> ring r=0,x,dp;
> number n=1234567;
> number m=n^100000;
//used time: 0.10 sec
> number mm=m^2;
//used time: 0.14 sec


If you are on a Windows Operating System, the value of timer might not
always be correct. There you need to use the
Code:
rtimer
command instead.
You can find further explanations and examples in the documentation
of Singular (entering help timer; or help rtimer;).

Christoph Lossen
(Singular Team)
Post Posted: Thu Sep 22, 2005 5:59 pm
  Post subject:  Timings in Singular  Reply with quote
Hi,

I build my codes in a proc. Now I want to know the exact time of my code
consume. How do I get it?
Are there any functions such as time() in Maple which provide this
service in Singular? If so, could you provide some examples ?
Post Posted: Thu Sep 22, 2005 5:45 pm


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