From: Arnd Bergmann > Sent: 05 February 2018 12:37 .... > > Are the EVTCHNOP_xxx values dense? > > In which case an array is almost certainly better than the switch statement. > > They are, yes. PHYSDEVOP_xxx are also consecutive by start at '4'. > Dan made the same comment earlier, and I replied that my I had > considered it but went for the more failsafe route. I also verified my > assumption now that gcc in fact is smart enough to turn this > into a table by itself:
I've never spotted that optimisation, must be fairly new. David _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel