cknave / elf2djgpp

Convert ELF object files to DJGPP COFF-GO32 objects
MIT License
10 stars 2 forks source link

What is it that makes this slow ? #2

Closed stuaxo closed 1 year ago

stuaxo commented 1 year ago

I wonder what it is that makes this process slow ... is there something fundamental about ELF parsing that is slow?

Or maybe it's something in the way we rewrite files.

It would be interesting to profile this and know we're not doing anything silly; it seems like the kind of thing there are many opportunities to be sub-optimal (this may be down to how we use LEIF).

I'm not sure other python interpreters are up to version 3.11, so that avenue may be out.

cknave commented 1 year ago

I did a mostly literal translation of the python code to rust, using ElfStream from https://docs.rs/elf/latest/elf/ instead of LIEF. It is now much faster.