My understanding is that local variables should be (theoretically) faster than global variables because all is contained in the child app for that rule. For global variables, it has to wake the main/parent Rule Machine app. In real use, I don't think either should cause "slowdowns," as this is likely just milliseconds of difference. Regardless, if you don't have a reason to use the variable outside of that particular rule, there's no reason to use a global variable--besides possible speed differences, you also have to worry less about naming (no name collisions and you can use the most logical name for that rule) and clutter (no need to make it visible everywhere).
That being said, your comparison is different: your first option uses two global variables, whereas your second uses a local variable and a virtual device. If you used a local variable for both, the comparison I mentioned above would apply, but with the virtual device, the rule child app has to call a method on another device. I can only guess here but would say that the performance would likely fall somewhere in between that of two local variables vs. two global variables (it has to call outside the rule--like a global variable--but the device is likely a much smaller driver than the parent Rule Machine app, so may load and run faster...again, all gueses based on what seems likely). Again, in real usage, I can't see this mattering too much but again don't see the need to bring in a virtual device unless you need it somewhere else (e.g., a "regular" app or another rule and don't want to use a global variable).
PS - Small history lesson: variables in in Rule Machine are newer than Rule Machine itself. The only way to do some of these things in the past was to use a virtual device as a sort of pseudo-variable (e.g., you could use a virtual switch as a proxy for a boolean variable--a common technique of the past--or a virtual dimmer as a proxy for certain numeric values). If you're looking at older rules or people who've been here a while and haven't gotten used to variables yet, that may be why you see some of this usage "in the wild" even if not really necessary. As usual with Hubitat, there are lots of ways to do the same thing.