Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Which is faster - com or exe?

Which is faster - com or exe?

Which is faster - com or exe?

I'm fairly new to assembly language programming on win32 and I'm using nasm to do some quick number crunching. Can anyone tell me which is faster out of a COM or EXE?
Many thanks in advance.

RE: Which is faster - com or exe?

COM is an archaic executable format which only supports really small (<64K) 16-bit programs.  In order to run such programs in win32, windows first has to start a VM to run the program.

EXE format files on the other hand will be native to the operating system, will benefit from being 32-bit in nature, not restricted in code size, nor to the 16-bit segmented architecture.  You'll also be able to access the win32 API.

If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

RE: Which is faster - com or exe?

Two points:

(1) In the very old days, .com files were supposed to start up a little quicker than .exes, but as Salem points out, this hasn't been true now for many years; in any case, start-up speed should be quick enough to be irrelevant (any comments on .net, anyone). If start-up speed is genuinely causing you problems, you need to think about what's going on. For instance, it's not a good idea to call an exe 47 million times in a loop from another application.

(2) Running speed depends on your code. Don't expect massive speed-ups by moving to nasm. If there's an underlying problem with choice of algorithm, any amount of careful optimization in assembly won't make things much faster. It's incredibly easy to write assembler that runs within 5% of the speed of compiled code, and not at all difficult to  write assembler that's somewhat slower than compiled code.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close