SQLite Forum

A high-res timer for SQLite UDFs
Login

A high-res timer for SQLite UDFs

(1) By Larry Brasfield (larrybr) on 2022-11-24 04:12:26 [source]

In connection with recent work on execution speed of some UDFs, I created a SQLite extension which, on modern computers, can use the high-resolution CPU counter to mark times and compute their differences with sub-microsecond resolution. I think it might be worthwhile to others, so here are the HiResTimer extension files. The C source and built extensions1 for the Linux 64-bit CLI and Windows 32-bit CLI are available there.

The head comment of the C source documents the UDF created by the extension and shows example usage.


  1. ^ I warrant that the extensions contain no malware or other monkey-business.