Compare the execution speed of programs – AnC Function by Kvc
In batch, there is no command to directly compare the execution speed of two or more batch programs. Analyze and Compare plugin, in short AnC plugin will help you calculate and compare the speed of execution of two or more files on the same system. It not only compares but also analyzes the comparison. This helps us to find out which of the selected program is faster. It even tells us how much faster it is than the slowest progress. This plugin was created by KVC. You can download it from our Github.
Syntax and download
As for the syntax of the plugin, the user just has to call AnC and input the paths of files that they want to be compared. Be sure to keep the files that are to be compared in the same folder as the AnC plugin. This will make things easy as then the user doesn’t have to mention the whole path of the file. They can compare them just by mentioning the names of files.
Call AnC [FilePath1] [FilePath2] [FilePath3] [...]
ver :- Displays the version of plugin help :- Displays help for the program FilePath1 :- Path of File1 FilePath2 :- Path of File2 FilePath3 :- Path of File3 [...] :- more files
call AnC "Button-1-Test.bat" "D:\Button-2-Test.bat"
AnC plugin runs the files given to compare by the user three times each. After that, it takes the average time taken to run the files three times as a time to be compared. To demonstrate the AnC plugin I have selected the following two files to compare and find out which one is faster and by how much.
For the first file, we have an example of the Gecho plugin. In this example, I have displayed different types of messages that can be printed using the Gecho plugin.
As for the second file, we have an example of the progress bar plugin. I have displayed a progress bar starting from1 and maximum progress of 30 with a width of 77.
Now for the comparison of the above two files using the AnC plugin. As shown below the Gechoexammple.bat file takes an average time of 75ms compilated. Which is faster than the ProgressTest.bat file which takes an average time of 477ms compilated by 6 times.
As you can see, this plugin can help you in choosing between a different program that gives the same type of output according to their compilation speed. Kvc has created an awesome plugin that will be very useful to many batch users, and hopefully, updates will come in the future. For more plugins like this visit our site at Batch-man, you can also join our Discord and YouTube community. Thank you for reading this article. If you have any comments or suggestions, feel free to leave them below.