Implement node/entry sort functions and *_bench commands.