To have an application run at maximum speed you should not allow any user interaction through the front panel. Disable all unnecessary OS interaction like networking, system extensions which are not needed aso.
Keep in mind though that the MacOS is not a real time operating system and you will always have time uncertainties to some extent.