5

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

  • 3
    A preliminary or initial implementation of application X. Depending on your audience, using beta or alpha also works. – Othya May 15 '15 at 14:10
  • 7
    You could also say "unoptimized version" since your audience is presumably programmers that is a term they will find natural, even if it isn't (currently) an English word. – amdn May 15 '15 at 14:35
  • 9
    What makes you think that "unoptimized" is not a word? – Hot Licks May 15 '15 at 18:23
  • 2
    Particular fields use words that are not general English words. "Unoptimized" is one of these. If you use any other word you will be unclear. Just use "unoptimized": it is the standard in programming, and anyone who knows what "optimized" means but doesn't know it's the standard will instantly understand what must be meant. – Rex Kerr May 15 '15 at 19:58
  • 3
    Unoptimized is absolutely a word. A word can be defined as a part of language that represents a concept and is made up of smaller parts (morphemes) to construct this meaning. Unoptimized is made of un- and optimized meaning not optimized. – Adam May 15 '15 at 23:47

14 Answers 14

17

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
| improve this answer | |
  • 3
    That's a whole lot of research just for one word. I applaud you. – Adam May 15 '15 at 23:38
  • @JoeBlow (and Adam) thank you, I have updated the answer as you suggested. – amdn May 17 '15 at 19:41
  • 1
    you know, it occurs to me too that, of course, not every "un" word is listed in the dictionary -- err, I think. – Fattie May 18 '15 at 3:02
17

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.

| improve this answer | |
  • yes, of course "unoptimized" is the absolutely correct and usual term, as Paul explains. Robby, if you're new to engineering two common terms used to describe code are scratch code and cowboy code .. that is to say for the early drafts of code or projects; you can read extensively about the nuances of meaning of these. Really this is more of a technical question from that arcane field than a general English question. – Fattie May 16 '15 at 2:59
6

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.

| improve this answer | |
  • Hm, I can't think of a good edit but looking at the comments and some of the other answers my answer is basically dealing with the wrong type of optimization. – Tarok May 15 '15 at 17:39
  • in computer code specifically, a "draft" version (not to mention scratch version, cowboy version, and as you say alpha, beta) are all totally different. an "unoptimized" version really has a totally different meaning to a "draft" version. Of course, just "in general terms" this is an excellent suggestion. – Fattie May 18 '15 at 3:04
5

You might try pre-optimized code.

| improve this answer | |
  • 1
    "Pre-optimized" doesn't address the question; he wants a word that will emphasize that it's the "first iteration of the code". – Othya May 15 '15 at 14:24
  • @Othya, the OP wants to identify the version of the executable produced by the compiler when the compiler has been instructed to generate instructions for the target machine as quickly as possible (fastest compilation time) without much regard to how fast those instructions will actually run. Unfortunately "code" is ambiguous as it is used to refer to both the source program (a program written in, say, the "C" programming language) and to refer to the executable (the program ready to be loaded in memory and executed by the processor). – amdn May 15 '15 at 14:52
5

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.

| improve this answer | |
  • exactly what I said in the comment to Tarok-answer applies here. in software "prototype" is utterly different from "unoptimised". by all means in general, non-computing usage it's yet another synonymesque term. – Fattie May 18 '15 at 3:07
3

How about the initial version of the code?

| improve this answer | |
  • As a professional programmer, this is misleading. Initial denotes "first", and in a programming context may suggest an initial revision or initial commit, which is quite different from the code produced at any stage of development by passing a compiler different arguments. – Two-Bit Alchemist May 15 '15 at 15:38
  • Furthermore, all this talk of versions "of the code" is misleading because the code is not what is being changed by enabling different compiler optimizations. When you say "the code", you're 99% of the time referring to the source code. Compiler optimizations modify what that gets changed into (the machine code the computer reads). – Two-Bit Alchemist May 15 '15 at 15:41
  • @Two-BitAlchemist as a professional programmer initial version makes sense to me, initial revision or commit are different things and most of the time irrelevant. The OP's usage of optimizations was confusing to me as well. – pllee May 15 '15 at 18:59
2

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.

| improve this answer | |
  • bravo for pointing out about profiling :) – Fattie May 18 '15 at 3:12
2

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.

| improve this answer | |
1

'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.

| improve this answer | |
1

Some general words that might be are:

Crude

Half-baked

| improve this answer | |
  • Your answer would be improved by explaining why these words are suitable, including elucidating dictionary definitions and examples. Without them, the poster has no way of evaluating whether these words are indeed appropriate, or are simply your opinion. I encourage you to review the help center, particularly the guidanceon writing good answers. – choster May 16 '15 at 7:51
0

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.

| improve this answer | |
  • 1
    Or raw code. As opposed go pessimized code, which is designed to run as slowly as possible while always legitimately trying to make progress toward the target. – keshlam May 15 '15 at 18:19
0

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?

| improve this answer | |
0

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.

| improve this answer | |
0

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.