Bench

Announcements of available shared folders

Bench

Postby oliver » Fri Dec 24, 2010 2:45 pm

Bench is a folder for programmers. It assists in timing/benchmarking.

Three functions are provided:
start -- call at the beginning of code you want to time
elapsed -- milliseconds since calling start
elapsedMsg -- a string containing an elapsed message, where elapsed time is reported in seconds

Usage examples:

In RPL:
Code: Select all
≪ Bench.start 1000 randomV Bench.elapsedMsg ≫

Bench.png
Taken from the Examples folder, the time to create a vector with 1000 random elements is reported
Bench.png (10.34 KiB) Viewed 4754 times


In JavaScript:
Code: Select all
function() { Bench.start(); doSomething(); return Bench.elapsedMsg(); }
oliver
Site Admin
 
Posts: 433
Joined: Sat May 01, 2010 2:11 pm

Re: Bench

Postby oliver » Fri Apr 22, 2011 4:50 pm

Bench has been updated to use TaggedObject, new in v1.3.5.
You can now do math with the timing data reported by elapsedMsg.
TaggedTimings.png
Timings are now tagged
TaggedTimings.png (6.22 KiB) Viewed 4721 times
oliver
Site Admin
 
Posts: 433
Joined: Sat May 01, 2010 2:11 pm


Return to Downloadable Folders / Shared Data

Who is online

Users browsing this forum: No registered users and 1 guest

cron