Stata 15 help for mf_favorspeed

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


real scalar favorspeed()


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.


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 */ }


favorspeed(): result: 1 x 1



Source code

Function is built in.

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