3 ms·
I've found GPT to be pretty good at cleaning up code. I've pasted in isolated blocks of code, asked it to tidy it up, and it often has nice suggestions. There'
by c7DJTLrn 3y ago
I've found GPT to be pretty good at cleaning up code. I've pasted in isolated blocks of code, asked it to tidy it up, and it often has nice suggestions.
There's a feature coming to Copilot where you can select code in-editor and prompt on it directly.
- UncleMeat 3y agoSuperoptimization has absolutely nothing to do with what GPT is doing. It doesn't happen in source and produces actually optimal code sequences (against some cost model) rather than doing some refactoring or tidying.
- klyrs 3y agoI'd hate to suggest that the comment about cleaning up code with GPT was written by GPT and posted without that crucial editing step. But the number of people who are using that tool instead of their wetware is certainly growing.
- c7DJTLrn 3y agoGPT's knowledge isn't up to date enough to know about the feature I mentioned. No, it wasn't written by GPT. It wasn't clear to me from the post that superoptimisation pertains to optimisation of machine code only.
- klyrs 3y agoIt doesn't pertain to the optimization of machine code only, but the distinguishing feature between optimization and superoptimization is that superoptimization produces an absolute shortest possible program given an instruction set. GPT doesn't do that. Copilot won't do that. Whatever cleanup feature you're describing is a non-sequitur here.
- UncleMeat 3y ago> GPT's knowledge isn't up to date enough to know about the feature I mentioned. Superoptimization has been around for well over a decade.
- KingMob 3y agoDecades, even. The term was coined by a 1987 paper.
- sbierwagen 3y ago>Good evening, GPT. Can you tell me what superoptimization is, in relation to computer programming? ChatGPT: Good evening! Superoptimization, in the context of computer programming, refers to the process of finding the optimal or most efficient implementation of a piece of code for a given task or problem. It involves automatically searching through all possible combinations of instructions and their arrangements to produce the most efficient code in terms of speed, memory usage, or other specific criteria. Superoptimization is typically performed by specialized tools or algorithms known as superoptimizers. These tools analyze the code and exhaustively explore the space of all possible code sequences, considering both the individual instructions and their order. The goal is to find the shortest or fastest sequence of instructions that achieves the desired output or behavior. Superoptimization is a computationally expensive process since it involves searching a vast solution space. Due to the exponential nature of the problem, it is often only feasible for small code snippets or performance-critical sections of code. Additionally, superoptimization may not always be practical or necessary because modern compilers and optimization techniques can often generate highly efficient code automatically. Superoptimization techniques have been primarily used in areas such as compiler design, code generation, and optimizing low-level code for specific architectures. They can be beneficial in situations where manual optimization is not feasible or when there is a need for extreme performance optimizations in constrained environments.
- lloydatkinson 3y agoImagine thinking superoptimisation is newer than 2021.
- c7DJTLrn 3y agoThat is not what I said. Read again.