Avoiding heap allocated box pointers