English Language & Usage Asked on December 29, 2020
I am working with some code, and I would like to describe the difference in its performance when it is optimized versus when it is not optimized. Unfortunately, I can’t find a word to describe the code before it is optimized; “sub-optimal” might work, but I want to emphasize that this is the first iteration of the code. If “unoptimized” were a word, I would use that, but I haven’t found any references to it in any dictionary.
Perhaps “raw” or “original”?
Unoptimized is the term most often used in the field of computing to refer to a program that has not been optimized, in your case to the output of the compiler when it has been instructed to not perform optimizations - as you clarified in the comments as a response to my question. Using unoptimized will be unambiguous to the reader regardless of level of expertise. The term is not listed in Oxford English Dictionaries - but it is precisely through usage that new words are included - so this should not keep you from using it. Incidentally, I have submitted to the Oxford Dictionaries team a link to this question for their consideration. Update: OED added unoptimized in June 2018.
unoptimized
Adjective
(computing) Not optimized.
YourDictionary.com
The Google database of patents shows 268 patents that use the terms code, compiler, and unoptimized.
As evidence of the de facto use of "unoptimized" to refer to machine code that has not been optimized I submit the following example, Hewlett-Packard patent US6202205
SUMMARY OF THE INVENTION
The present invention provides a system and method to perform on-line profile based optimization of a software library. According to the invention, this is accomplished by profiling an unoptimized software library while it is used by an application, using the resulting profile data to create an optimized software library and then replacing the unoptimized software library with the optimized software library without restarting the application.
Google: Patents: Hewlett-Packard patent US6202205
A Google ngram chart shows the rising usage of the term unoptimized, beginning in the 1960's, coinciding with the rise in computer programming.
The word code has different meanings, even within the field of computing, see Wikipedia: Code(disambiguation). In your question, code might be interpreted as one of two things:
- In computing, source code is any collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text. The source code of a program is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source code. The source code is often transformed by a compiler program into low-level machine code understood by the computer. The machine code might then be stored for execution at a later time. Alternatively, an interpreter can be used to analyze and perform the outcomes of the source code program directly on the fly.
Wikipedia: Source code- Machine code or machine language is a set of instructions executed directly by a computer's central processing unit (CPU). Each instruction performs a very specific task, such as a load, a jump, or an ALU operation on a unit of data in a CPU register or memory. Every program directly executed by a CPU is made up of a series of such instructions. Numerical machine code (i.e., not assembly code) may be regarded as the lowest-level representation of a compiled or assembled computer program or as a primitive and hardware-dependent programming language. While it is possible to write programs directly in numerical machine code, it is tedious and error prone to manage individual bits and calculate numerical addresses and constants manually. It is thus rarely done today, except for situations that require extreme optimization or debugging. Almost all practical programs today are written in higher-level languages or assembly language and translated to executable machine code by utilities such as compilers, assemblers and linkers. Programs in interpreted languages1 are not translated into machine code although their interpreter (which may be seen as an executor or processor) typically consists of directly executable machine code (generated from assembly or high level language source code).
Wikipedia: Machine code
The optimization of code is therefore also ambiguous, as it might refer to
By your answers to questions in the comments we have determined that you are after a term that describes the version of the program generated by a compiler when it has been told to not perform optimizations. This is known by programmers as either the "debug version" or the "unoptimized version."
The description of the optimization levels that can be requested in the well known GCC compiler is instructive, and uses the term you suggested, "unoptimized"
8.3.1.3 Optimization Levels
Without any optimization option, the compiler's goal is to reduce the cost of compilation and to make debugging produce the expected results. Statements are independent: if you stop the program with a breakpoint between statements, you can then assign a new value to any variable or change the program counter to any other statement in the subprogram and get exactly the results you would expect from the source code.
Turning on optimization makes the compiler attempt to improve the performance and/or code size at the expense of compilation time and possibly the ability to debug the program.
The default is optimization off. This results in the fastest compile times, but GNAT makes absolutely no attempt to optimize, and the generated programs are considerably larger and slower than when optimization is enabled.
- `-O0' No optimization (the default); generates unoptimized code but has the fastest compilation time. Note that many other compilers do fairly extensive optimization even if 'no optimization' is specified. With gcc, it is very unusual to use -O0 for production if execution time is of any concern, since -O0 really does mean no optimization at all. This difference between gcc and other compilers should be kept in mind when doing performance comparisons.
GCC: Optimization Levels
Correct answer by amdn on December 29, 2020
You might try pre-optimized code.
Answered by DJ Far on December 29, 2020
How about the initial version of the code?
Answered by Bookeater on December 29, 2020
If you are bent on using a single word here draft is the first one that comes to my mind. According to Merriam-Webster:
a version of something (such as a document) that you make before you make the final version
More specifically:
5 a : delineation, representation
b : scheme, design
c : a preliminary sketch, outline, or version
Otherwise I think the suggestions made by @Othya are quite fitting:
initial implementation, beta and alpha
All the more when considering a software related environment.
Seeing as you are talking about code the difference between optimized and non-optimized code may very well be a different algorithm so picking out an easy-to-spot feature of the different algorithms as namesakes might be another approach. As an example consider Insertion-Sort versus Merge-Sort.
Answered by Tarok on December 29, 2020
Speaking as a professional programmer, I would say "unoptimized," even though it is not a dictionary term, is sufficiently conducive of your meaning, especially to other programmers. Furthermore, it is a term I personally use on a regular basis.
Despite its non-word status, even to the non-technical person (e.g. a client or a high-level executive), the general meaning of the term is immediately intuitive.
Answered by Paul Griffin on December 29, 2020
You might consider referring to the original solution to a problem as a hack, call it hackish, or say that it was hacked together, especially if the solution is rough. It's not uncommon for robust, optimized code solutions to evolve from humbly hackish beginnings.
This wouldn't work if your initial, non-optimal solution is well-formed and carefully crafted. I'd also hesitate to use this term in professional documentation or in communications with anyone outside of your developer peer group (e.g. bosses, customers). In these scenarios, I'd stick to the other answers provided here.
Answered by talrnu on December 29, 2020
I usually hear the initial implementation of a piece of software referred to as version zero, but I have heard initial version used often as well.
Since you should not be optimizing code without first profiling it, the term you should use on code that has unknown performance issues is unprofiled.
If the code has been profiled, it means that if performance is a problem, the sources of the performance issues have been identified, but not yet fixed. I would say the code still has performance bugs, or use the negation of the technical term performant, and say the code is nonperformant.
Answered by jxh on December 29, 2020
I like prototype for this.
It conveys that it is unfinished or unrefined, without attacking it by referring to it as a hack, or venturing off-industry to use words such as draft.
Prototype can (in some situations) connote that the product is still missing features or design assets, so if you want to make it clear that these are not the case, you can manage these expectations by saying, working prototype or even final prototype - but if you don't, all you really risk is impressing people with how complete the product appears.
{Note however that, conversely, in other situations, "prototype" means precisely a very rough yet finished version which, specifically, contains every single feature which will be present in the final product. Then again, in certain milieu, prototype means very specifically: the first hand-produced item which is precisely and totally exactly as the final product should be, representing the final quality and finish of the product for sale, once the final product comes off a production line.}
alpha and beta are also good words for early, functioning-but-not-final versions of code in progress, but these refer more to a project-in-whole (or a version thereof), while a prototype can refer to a single feature.
Answered by webbcode on December 29, 2020
Some general words that might be are:
Crude
Half-baked
Answered by AnotherDeveloper on December 29, 2020
There is no one word to your situation exactly. "first iteration" and unoptimized are two different things. A first iteration of code may be highly optimized or a highly mature codebase may have zero optimizations, most of the time new code is not optimized but there is no direct correlation. Also optimization can mean a few things: run time optimization, compile time optimization, source code optimization etc. I think in your case you are talking about source code optimization.
Also it is confusing to me that the code is at its initial version but it is slower than the optimized one, what is the optimized one if there is only an initial version?
Answered by pllee on December 29, 2020
More context would help. I'm a software engineer, non-optimised
code is just called non-optimised
. An inelegant algorithm might be brute force
or you might just describe a first stab
at some code as crude
, clunky
or ugly
.
Answered by BanksySan on December 29, 2020
I'm a little out of my depth here, in terms of the names of parts of speech, but "optimized", when used as an adjective, is apparently known as a deverbal adjective. And, according to that reference, deverbal adjectives may be modified with ordinary prefixes, such as "un".
Therefore, "unoptimized" is a perfectly valid word.
Answered by Hot Licks on December 29, 2020
'First pass' could refer to an initial attempt. It doesn't have the 'not finalised or released officially' connotations of draft or beta.
I also think that these days 'v1.0' is acquiring a general using meaning 'first attempt before refinement' beyond its strict software definition.
Answered by MrDave on December 29, 2020
There is an idiom in general usage (at least in the US), "quick and dirty," which means something that was expedient and easily done but is not of the best quality. In the software business this phrase is often used to describe code that was written with the goal of getting something that "works" as soon as possible, without any attempt to optimize it (or, usually, to do many of the other things that would make a piece of software viable in the long run).
This is especially applicable to the first version of a piece of software. So if you want to emphasize that the code you are working with is only in its first iteration, and there has not been time yet to optimize it, you could call it quick and dirty code.
Answered by David K on December 29, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP