• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Why isn't assembler used more often?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Too Smart

Member
Joined
Feb 16, 2002
Do the high level languages used by most software developers cause the software to require more system resources? For example, if the latest games say Unreal Tournament 2003, was written completely in assembler, would it run on a 386? I'm confused why the latest software (especially games) require such powerful computers. It took the power of approximately 2 C-64's to send a man to the moon, and now it takes a computer several thousand times more powerful 40 seconds just to load my operating system. Is this because programmers are getting worse and writing less efficient code with more high level programming language that result in bloated software or what?
 
If UT2003 were written in assembler, it wouldn't be out yet. The main reason everything isn't written completely in assembler is because its more complex and time consuming.

The payoff over C isn't even that large all the time. Ut2003 does have assembler in it, though. Usually what they do is rewrite the heavily used bits in assembler for better performance, but the rest is still in a high level language like C or C++.

Your OS loading in 40 seconds is partially because its coming off a hard drive and your bios spends time sitting around. The rest probably isn't due to inefficient code, but because it is doing alot. I don't think I'd equate extra features with bloat straight out.
 
the way i understand it is the the reasons new languages keep coming out is not to nesicarrily add features, but make more things possible to do. also when a program is compiled it is just basically reduced to assembly, but "better" assembly code can be written by humans over compilers.

the reason UT2003 ect is so slow is becasue there is so much goign on and there is so much to do. the language something is written is has no effect on the speed is runs(acually this isnt true, cause languages like java are not pre-compiled and therefore can be run on x86 and mac and stuff).
 
cjlax5 said:
the language something is written is has no effect on the speed is runs(acually this isnt true, cause languages like java are not pre-compiled and therefore can be run on x86 and mac and stuff).

The language might not seem to, but the compiler can make a huge difference. You could compile some complex C++ source with a crappy Codeworks compiler, then recompile it with an Intel compiler -- the Intel-compiled version would almost certainly run noticeably faster.

But the language itself can also play a big role in the speed of the actual program. Java isn't slower than C just because it can be dynamically compiled. It also spends a lot of time managing memory and translating routines to platform-specific system calls. With C/C++ the programmer has to handle all of that (which isn't always a good thing, but makes the program run faster).
 
That would kick ***. But, though I hate to admit it, I'm not sure if it'd be possible unless there's a Direct3D module for Perl out there. Even then, Perl would just be a wrapper.
 
VB is maybe just a little to slow :p

My understanding is that high level languages are much more platform independant, it is easier to get something written in high level language to run on lots of different proc types, eg 386, 485.

Correct me if i am wrong, but I remember being taugh this at college sumtime. Also it is much less complex to program in a high level language as has been said already, it would take forever to write full games in Assembler.

just my $0.02
 
Takes more time - you have to lay out every single machine instruction for a particular operation (i.e. copying some string value from 1 variable to another) - in C, it is 1 function call - it will have several instructions in assembler which is more error-prone and less maintainable as well - also, a lot of compilers do optimize generated machine code whereas coding in assembler, it would be up to you to do ur best although Macro Assembler (another beast) can ease the pain for ya...

Also, the major point is PORTABILITY - an assembler program is very machine (processor hardware dependent) where C for instance can be quite portable in majority...so assembler is used in certain area of code where fine granularity of optimization is required or where communication with certain chips is done via assembler only...

--fibo
 
If UT2003 were written in pure asm, it wouldn't be running under Linux, OSX, and Windows right now.
 
yes the main reason is portability and also takes a crap load of time. The same reasons operating systems are written mostly in high level languages.
 
Portability in operating systems is overrated imho, it makes it harder to focus on adding pimp features.
 
Back