Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

measureTime

measureTime( 
g_expression ... 
) 
=> l_result

Description

Measures the time needed to evaluate an expression and returns a list with performance data (n_utime, n_stime, n_clockTime, and x_pageFaults) for the executed expressions. This is a syntax form.

Arguments

g_expression

Expression(s) to be evaluated and timed.

Value Returned

l_result

A list with performance data (n_utime, n_stime, n_clockTime, and x_pageFaults) for the executed expressions.

Examples

myList = nil            ; Initializes the variable myList.
measureTime( for( i 1 10000 myList = cons(i myList) ) )
=> (0.4 0.05 0.4465 0)

Result indicates that it took .4 seconds and 0 page faults to build a list from 1 to 10,000 using cons.

myList = nil            ; Initializes the variable myList.
measureTime( for( i 1 1000 myList = append1(myList i) ) )
=> (5.04 0.03 5.06 0)

Result indicates that it took 5 seconds and 0 page faults to build a list from 1 to 1000 using append1.

tab = makeTable("testTable" 'unbound 5000)
=> table:testTable
result = measureTime(for(i 0 10000 tab[i] = t))
=> (0.003 0.0 0.002537012 0)

Related Topics

Core Functions


Return to top
 ⠀
X