some microoptimisations on egfx