Add 'properties => ['name', 'vm']' to your $host_view get_view() call to reduce the host overhead.
The only other overhead I can for see would be your script load time....you could compile your perl into an EXE or write a simple C++ program that does the same if that's the case.
But try the host property reduction first, the host objects are actually quite large.