inline benchmark edis
minor optimisations?
misc edits