Stata 15 help for mf_favorspeed

[M-5] favorspeed() -- Whether speed or space is to be favored

Syntax

real scalar favorspeed()

Description

favorspeed() returns 1 if the user has mata set matafavor speed and 0 if the user has mata set matafavor space or has not set matafavor at all; see [M-3] mata set.

Remarks

Sometimes in programming you can choose between writing code that runs faster but consumes more memory or writing code that conserves memory at the cost of execution speed. favorspeed() tells you the user's preference:

if (favorspeed()) { /* code structured for speed over memory */ } else { /* code structured for memory over speed */ }

Conformability

favorspeed(): result: 1 x 1

Diagnostics

None.

Source code

Function is built in.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index