albertan017 / LLM4Decompile

Reverse Engineering: Decompiling Binary Code with Large Language Models
https://arxiv.org/abs/2403.05286
MIT License
3.22k stars 236 forks source link

Update and rename run_evaluation_llm4decompile_singleGPU.py to update… #25

Open thisisvk45 opened 3 months ago

thisisvk45 commented 3 months ago

…d_run_evaluation_llm4decompile_singleGPU.py

The optimized code improves efficiency by minimizing file operations and subprocess calls. It consolidates file writes and uses temporary files more effectively, reducing redundant operations. By combining compile and run commands and handling exceptions concisely, the code avoids unnecessary subprocess calls.

String operations are streamlined using str.splitlines() and str.strip() to handle and process strings more efficiently. Additionally, the prompt preparation and decoding steps are simplified to speed up data processing. These changes collectively enhance the time and space efficiency of the code.

albertan017 commented 2 months ago

Thank you for your interest. However, we haven't observed any speed improvements with the script. It would be beneficial if you could use tempfile to handle the files, as implemented in run_evaluation_llm4decompile_vllm.py.