Closed bentay closed 6 years ago
Ah, C.CBytes is apparently a newish feature. https://golang.org/doc/go1.7#cmd_cgo
Hello @bnagy do you think we can merge this ? :+1:
Maybe compare to https://github.com/lunixbochs/capstr performance? I heavily optimized the C->Go interface and allocations, as cgo is a bit slow.
This adds a DisasmIter() to the engine that returns a channel of instructions and leverages cs_disasm_iter. According to capstone.h "some benchmarks shown that cs_disasm_iter() can be 30% faster on random input." Benchmark data with new changes below: