Schedule Dates

I am currently reviewing Project Euler issues, and I am solving them in both C # and the diagram ( Racket ). I know C #, but I learn the Scheme when I go.

Now that I have the right results for the problems, I like to come up with the fastest solution that I can think of. For this, in C # I use StopWatch to measure the performance of my code. Is there a similar library / circuit functionality for executing temporary code?

+8
scheme racket timing
source share
1 answer

Just attach the entire part you want time in the time expression (this works in most implementations, including Racket):

 (time (rest-of-program)) 

You can also use the Unix time command if you are using Linux / OSX / BSD / etc., For example.

 time ./my_program 
+11
source share

All Articles