Is there a single word to describe a solution that hasn't been optimized?

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"?


Solution 1:

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

enter image description here

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. enter image description here

Discussion

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

  • the human (programmer) process of improving the performance of a program by changing the source code, or
  • the compiler process of improving the performance of a program by analyzing the source code and generating machine code that results in faster execution (typically, although a compiler may also optimize for space, that is the smallest machine code or data size)

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

Solution 2:

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.

Solution 3:

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.

Solution 4:

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.

Solution 5:

You might try pre-optimized code.