There is already an OOTB action to do this: findVcVmByUuid. You could hopefully presume they've implemented the fastest method of retrieving a VM.
Alternatively if you have the MoRef you can use something like
const vm = Server.findForType('VC:VirtualMachine', System.getObjectId(sdkConnection) + '/' + moRef);
which will directly return the machine from the plugin (which is potentially cached).