In this repository, we compare the speed of B2R2's disassembly with 3 other well-known disassembly libraries. For the comparison, we use three different raw binary blobs that we gathered from default linux distros as follows.
We compare B2R2 (v0.5.0) against three .NET-based tools. For Capstone, we used both the Python version and .NET version.
<bit-length>
is either 32 or 64, and <target file path>
is the path to one
of the blobs.
dotnet run -c release --project b2r2_test/b2r2_test/b2r2_test.csproj <bit-length> <target file path>
dotnet run -c release --project iced_test/iced_test/iced_test.csproj <bit-length> <target file path>
dotnet run -c release --project sharpdisasm_test/sharpdisasm_test/sharpdisasm_test.csproj <bit-length> <target file path>
dotnet run -c release --project Capstone.NET_test/Capstone.NET_test/Capstone.NET_test.csproj <bit-length> <target file path>
python capstone_test_python.py <bit-length> <target file path>
Below is the result showing how many seconds it took to disassemble each binary blob (lower is better). Each number is the average of 10 repeated runs. B2R2 took the second place, but please note that B2R2 is not merely a disassembly engine: it can lift a binary into a well-formed IR, and it can recover CFG from it, and many more.
Rank | Tool | blob_x86 | blob_x86_64 | libc_x86 | Average |
---|---|---|---|---|---|
1 | Iced (C#) | 25.067 | 21.549 | 0.594 | 15.737 |
2 | B2R2 (F#) | 28.298 | 24.317 | 0.63 | 17.748 |
3 | SharpDisasm (C#) | 29.03 | 25.234 | 0.7 | 18.321 |
4 | Capstone.NET (C#) | 127.847 | 106.414 | 2.245 | 78.835 |
5 | Capstone (python) | 132.693 | 111.604 | 2.22 | 82.172 |