Thread: C speed.

  1. #1
    Registered User caroundw5h's Avatar
    Join Date
    Oct 2003
    Posts
    751

    C speed.

    I wanna know just HOW fast is C. Is it the fastest language? how fast is it really? Can it be faster. forgive if its a silly question, but is it as fast as your machine will allow it or are there limitations?

    Also, when C was first created, what language was used to do so. Obviously you can create C from C but does anyone know. Pascal, BCPL??? ADA??? just really curious cause its been plaguing me.
    Warning: Opinions subject to change without notice

    The C Library Reference Guide
    Understand the fundamentals
    Then have some more fun

  2. #2

  3. #3

  4. #4
    Registered User
    Join Date
    Jul 2004
    Posts
    6
    Define "fastest."

    If you mean shortest execution time, I think you'll find that for
    most programs you write, if you compile it to machine code it's
    going to run comparably under most languages. If the program
    is being interpreted by another program, odds are it's going to be
    much slower than a compiled version of the same program.

    For example, a loop that counts from 1 to 10 compiled for the
    same architecture in FORTRAN, Ada, Pascal or C is likely going to
    contain pretty much the same instructions no matter what you do.

    One area in which you get differences are the libraries used to
    do common things, like input/output. Maybe C's standard library
    is faster than the Pascal library, or maybe they're actually referencing
    much the same library/kernel code. It's kind of hard to tell,
    generically.

    C is fast because it has little overhead, unlike C++ or other OOP
    languages (cen be) where there's lookups being done to figure out who's doing what to whom.

    Hopefully this gives you a little more insight into your issue.

  5. #5
    Registered User caroundw5h's Avatar
    Join Date
    Oct 2003
    Posts
    751
    it actually does. Thanks a lot. I appreaciate it.
    Warning: Opinions subject to change without notice

    The C Library Reference Guide
    Understand the fundamentals
    Then have some more fun

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I am very new . . . :(
    By Eternalglory47 in forum C++ Programming
    Replies: 6
    Last Post: 09-05-2008, 11:29 AM
  2. Flight Simulator Wind Speed!!
    By Dilmerv in forum C++ Programming
    Replies: 6
    Last Post: 03-20-2006, 12:40 AM
  3. Replies: 6
    Last Post: 01-08-2006, 02:49 PM
  4. increased net speed
    By PING in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 03-29-2005, 07:05 AM
  5. Questions on Speed of Execution
    By wavering in forum C Programming
    Replies: 22
    Last Post: 01-20-2002, 02:04 PM