rice: split cold paths out of hot function