Replaced uint_fast64_t with struct cursor_t and got a little better performance