lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Nov 24, 2015 at 12:21 AM, Coda Highland <chighland@gmail.com> wrote:
> That said, clock() alone is sufficient, so time() could be cached on
> startup, which would cut the number of syscalls in half.

time() is the least costly of the two. At least on Linux, time() is
simply a memory access not a system call [1].

[1] http://man7.org/linux/man-pages/man7/vdso.7.html

-- 
Patrick Donnelly