Such an unapply might probably be faster, but given the binary compatibility constraints we have, using trees might be more prudent.