Skip to content

Instantly share code, notes, and snippets.

@melanchall
Last active March 26, 2021 17:28
Show Gist options
  • Save melanchall/d5dd6ee785a94c9df0443fd7616d9c8b to your computer and use it in GitHub Desktop.
Save melanchall/d5dd6ee785a94c9df0443fd7616d9c8b to your computer and use it in GitHub Desktop.
DryWetMIDI benchmarks (synthetic) for version 5.2.0

DryWetMIDI benchmarks (synthetic) for version 5.2.0

means improvement by 1-2 times
↓↓ means improvement by 2-5 times
↓↓↓ means improvement by >5 times

Old ms is execution time on version 5.1.2
New ms is execution time on version 5.2.0
ms ↓↑ is execution time improvement (times)
Old MB is allocated memory in megabytes on version 5.1.2
New MB is allocated memory in megabytes on version 5.2.0
MB ↓↑ is allocated memory improvement (times)

TrackChunk based

These benchmarks show performance improvement of methods accepting TrackChunk as an argument.

GetNotes

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
GetNotes_NotesOnly 99.1 48.1 ↓↓ 2.1 times 30.3 13.4 ↓↓ 2.3 times
GetNotes_NoNotes 50.6 5.5 ↓↓↓ 9.3 times 12.8 4.8 ↓↓ 2.7 times
GetNotes_EventsWithinNote 57.7 19.8 ↓↓ 2.9 times 13.8 8.6 ↓ 1.6 times

GetTimedEvents

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
GetTimedEvents 475.4 234.1 ↓↓ 2 times 73.3 49.7 ↓ 1.5 times

ProcessNotes

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
ProcessNotes_NotesOnly 117 32.3 ↓↓ 3.6 times 31.7 11.1 ↓↓ 2.8 times
ProcessNotes_NotesOnly_Time 115.4 35 ↓↓ 3.3 times 31.7 11.2 ↓↓ 2.8 times
ProcessNotes_NoNotes 76.5 11.7 ↓↓↓ 6.6 times 14 2.7 ↓↓↓ 5.2 times
ProcessNotes_NoNotes_Time 76.4 11.7 ↓↓↓ 6.5 times 14 2.7 ↓↓↓ 5.2 times
ProcessNotes_EventsWithinNote 73.6 27.2 ↓↓ 2.7 times 15 6.5 ↓↓ 2.3 times
ProcessNotes_EventsWithinNote_Time 73.8 27.5 ↓↓ 2.7 times 15 6.5 ↓↓ 2.3 times

ProcessTimedEvents

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
ProcessTimedEvents 712.6 131.9 ↓↓↓ 5.4 times 76.7 26.7 ↓↓ 2.9 times
ProcessTimedEvents_Time 696.5 144.5 ↓↓ 4.8 times 76.7 26.7 ↓↓ 2.9 times

RemoveNotes

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
RemoveNotes_NotesOnly_RemoveNone 106.4 11.4 ↓↓↓ 9.3 times 30.9 10.7 ↓↓ 2.9 times
RemoveNotes_NotesOnly_RemoveEverySecond 89 12.2 ↓↓↓ 7.3 times 91.7 27.1 ↓↓ 3.4 times
RemoveNotes_NotesOnly_RemoveAll 94 11.7 ↓↓↓ 8 times 87.5 22.9 ↓↓ 3.8 times
RemoveNotes_NoNotes_RemoveNone 76.1 3.9 ↓↓↓ 19.4 times 14 2.3 ↓↓↓ 6.1 times
RemoveNotes_NoNotes_RemoveEverySecond 72.9 3.9 ↓↓↓ 18.6 times 14 2.3 ↓↓↓ 6.1 times
RemoveNotes_NoNotes_RemoveAll 74.8 3.8 ↓↓↓ 19.5 times 14 2.3 ↓↓↓ 6.1 times
RemoveNotes_EventsWithinNote_RemoveNone 72.4 11.2 ↓↓↓ 6.5 times 15 6.1 ↓↓ 2.5 times
RemoveNotes_EventsWithinNote_RemoveEverySecond 76.6 3.9 ↓↓↓ 19.5 times 14 2.3 ↓↓↓ 6.1 times
RemoveNotes_EventsWithinNote_RemoveAll 74.2 3.9 ↓↓↓ 19.2 times 14 2.3 ↓↓↓ 6.1 times

RemoveTimedEvents

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
RemoveTimedEvents_RemoveNone 502.5 27.5 ↓↓↓ 18.2 times 65.3 22.9 ↓↓ 2.8 times
RemoveTimedEvents_RemoveEverySecond 55.4 1.1 ↓↓↓ 52 times 54.3 4.2 ↓↓↓ 12.9 times
RemoveTimedEvents_RemoveAll 30 0.3 ↓↓↓ 111.2 times 32.9 0 ↓↓↓ ∞ times

MidiFile based

These benchmarks show performance improvement of methods accepting MidiFile as an argument.

GetNotes

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
GetNotes_NotesOnly 148.3 134.1 ↓ 1.1 times 52.2 39.6 ↓ 1.3 times
GetNotes_NoNotes 26.4 11.2 ↓↓ 2.4 times 13.1 8.2 ↓ 1.6 times
GetNotes_EventsWithinNote 44.9 35.3 ↓ 1.3 times 23 19.8 ↓ 1.2 times

GetTimedEvents

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
GetTimedEvents 738.8 370.6 ↓ 2 times 104.7 64.9 ↓ 1.6 times

ProcessNotes

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
ProcessNotes_NotesOnly 142.7 119.2 ↓ 1.2 times 51.3 38.3 ↓ 1.3 times
ProcessNotes_NotesOnly_Time 144.2 116.5 ↓ 1.2 times 51.3 38.3 ↓ 1.3 times
ProcessNotes_NoNotes 56.8 36.5 ↓ 1.6 times 14.2 7.8 ↓ 1.8 times
ProcessNotes_NoNotes_Time 57.1 37 ↓ 1.5 times 14.2 7.8 ↓ 1.8 times
ProcessNotes_EventsWithinNote 96 82.8 ↓ 1.2 times 24.8 19.1 ↓ 1.3 times
ProcessNotes_EventsWithinNote_Time 94.2 68.9 ↓ 1.4 times 22.9 12.4 ↓ 1.8 times

ProcessTimedEvents

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
ProcessTimedEvents 749.9 281.2 ↓↓ 2.7 times 78.8 42 ↓ 1.9 times
ProcessTimedEvents_Time 747.5 265.8 ↓↓ 2.8 times 78.8 42 ↓ 1.9 times

RemoveNotes

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
RemoveNotes_NotesOnly_RemoveNone 134.8 58.8 ↓↓ 2.3 times 50.1 35.1 ↓ 1.4 times
RemoveNotes_NotesOnly_RemoveEverySecond 1515.7 154 ↓↓↓ 9.8 times 1409.3 95.5 ↓↓↓ 14.8 times
RemoveNotes_NotesOnly_RemoveAll 1475.2 148.5 ↓↓↓ 9.9 times 1405.1 91.3 ↓↓↓ 15.4 times
RemoveNotes_NoNotes_RemoveNone 57.1 8.8 ↓↓↓ 6.5 times 14.3 5.7 ↓↓ 2.5 times
RemoveNotes_NoNotes_RemoveEverySecond 58.5 8.6 ↓↓↓ 6.8 times 14.3 5.7 ↓↓ 2.5 times
RemoveNotes_NoNotes_RemoveAll 57.9 8.7 ↓↓↓ 6.7 times 14.3 5.7 ↓↓ 2.5 times
RemoveNotes_EventsWithinNote_RemoveNone 97.3 27.6 ↓↓ 3.5 times 24.8 15.9 ↓ 1.6 times
RemoveNotes_EventsWithinNote_RemoveEverySecond 92.6 17.8 ↓↓↓ 5.2 times 22.8 9.2 ↓↓ 2.5 times
RemoveNotes_EventsWithinNote_RemoveAll 92.8 17.8 ↓↓↓ 5.2 times 22.8 9.2 ↓↓ 2.5 times

RemoveTimedEvents

Benchmark Old ms New ms ms ↓↑ Old MB New MB MB ↓↑
RemoveTimedEvents_RemoveNone 545.7 72.7 ↓↓↓ 7.5 times 67.3 22.9 ↓↓ 2.9 times
RemoveTimedEvents_RemoveEverySecond 579.4 121.2 ↓↓ 4.8 times 510 90.5 ↓↓↓ 5.6 times
RemoveTimedEvents_RemoveAll 327.2 30.8 ↓↓↓ 10.6 times 333.9 5.3 ↓↓↓ 62.4 times
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment