Have the naive version running and it seems to be the fastest.