Use primitive queue to remove mem and boxing overhead