core: more minor perf tweaks