code porting

  • Evaluating LLMs in Code Porting Tasks


    Testing LLM ability to port code - Comparison and EvaluationThe recent discussion about replacing C and C++ code at Microsoft with automated solutions raises questions about the current capabilities of Large Language Models (LLMs) in code porting tasks. While LLMs have shown promise in generating simple applications and debugging, achieving the ambitious goal of automating the translation of complex codebases requires more than just basic functionality. A test using a JavaScript program with an unconventional prime-checking function revealed that many LLMs struggle to replicate the code's behavior, including its undocumented features and optimizations, when ported to languages like Python, Haskell, C++, and Rust. The results indicate that while some LLMs can successfully port code to certain languages, challenges remain in maintaining identical functionality, especially with niche languages and complex code structures. This matters because it highlights the limitations of current AI tools in fully automating code translation, which is critical for software development and maintenance.

    Read Full Article: Evaluating LLMs in Code Porting Tasks