latency benchmark, slow, similar to matlab, may want to switch to C++ wrapper