measure time static vs. dynamic