GSoftwareDevelopment / MIDICar-Player

ATARI 8-bit MIDI Player via MIDICar
5 stars 3 forks source link

MIDI stream processing optimization #19

Open GSoftwareDevelopment opened 1 year ago

GSoftwareDevelopment commented 1 year ago

Cost of cycles for operations:

place operation old new profit(1)
midi process Check track stop flag 11 11 0
midi process Calculate of condition totalTicks>=_trackTime 72 76 -4
midi process Copy track registers to ZP 129(2) 80(3) 49
track process Check track stop flag 23 21 2
track process Jump to jump 27 6 21
track process End of track (stop flag set) 8 14 -6
midi process Copy ZP to track registers 137(2) 88(3) 49
407 296 111

The results are given for the whole operation.

(1) A negative value means a loss (2) in loop (3) unroll loop