Thread: Where is lightspeed.

  1. #1
    Registered User
    Join Date
    Dec 2015
    Posts
    142

    Where is lightspeed.

    Finally, using c++, and manipulating a COMPUTER, I notice something strange. Why, when I set up a infinite loop to for ex. increment a number or show the same identical text over and over in the command box, I repeat why, does it only do around 80 calculations per second?(80 texts appear per sec ONLY!!)! When transistors in computers can turn on/off trillions of times per second? Did, the founders, of the computer, choke, the real speed?
    Last edited by ADVANCESSSS; 01-09-2016 at 04:07 PM.

  2. #2
    Registered User
    Join Date
    Dec 2011
    Posts
    26
    Quote Originally Posted by ADVANCESSSS View Post
    Where is lightspeed
    I don't know. Where did you see it last time?

  3. #3
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    In my above paragraph I mentioned the cmd box in codeblocks, it outputs slowwwwwwwwwwwwwwwwwwwwwww, why can't it do a million a sec at-least (outputing the same text means like no calculations, of which still wouldn't take up the millions of signals it can do). As I said above, transistors can turn on/off trillion of times per sec.

  4. #4
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Your computer is electrical, it does not use light as energy, so how fast a photon travels in space is entirely divorced from the speed of your personal computer.

    This explains the computer's speed:
    Within your computer's CPU is an electronic clock. The clock's job is to create a series of electrical pulses at regular intervals. This allows the computer to synchronize all its components and it determines the speed at which the computer can pull data from its memory and perform calculations.
    When you talk about how many gigahertz your processor has, you're really talking about clock speed. The number refers to how many electrical pulses your CPU sends out each second. A 3.2 gigahertz processor sends out around 3.2 billion pulses each second. While it's possible to push some processors to speeds faster than their advertised limits -- a process called overclocking -- eventually a clock will hit its limit and will go no faster.
    [...] Computer performance can also be measured in floating-point operations per second, or flops. Current desktop computers have processors that can handle billions of floating-point operations per second, or gigaflops. Computers with multiple processors have an advantage over single-processor machines, because each processor core can handle a certain number of calculations per second. Multiple-core processors increase computing power while using less electricity [source: Intel]
    So the answer to "where is lightspeed?" is ... not in your computer!

    If you intend to call yourself a genius in science, you should know that this is a basic mistake. Photons and electrons are different things.

  5. #5
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    I know that it's electrons in wires, and I know lightspeed is really fast and the amount of moves a photon makes a sec are many and electrons are somewhat more slower or somethin.

    But let me check your link.....1sec...
    ---
    Ok but I still don't get it, if it can make billion(s) of signal pulses per sec, why can't it store instantly 800,000 of the same text and on my pc screen the next time it refreshes has 800,000 up above in the text black box thingy~???
    Last edited by ADVANCESSSS; 01-09-2016 at 06:00 PM.

  6. #6
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    I'm not going to wait, so I hope you don't mind.

  7. #7
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Keep in mind, I think it's impossible for anything with mass to actually hit light speed. And electrons have mass.

  8. #8
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    I updated it^

  9. #9
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Quote Originally Posted by ADVANCESSSS View Post
    Ok but I still don't get it, if it can make billion(s) of signal pulses per sec, why can't it store instantly 800,000 of the same text and on my pc screen the next time it refreshes has 800,000 up above in the text black box thingy~???
    It can, but that doesn't mean it does.

    The only reason you're wrong is because you are making an absolute statement about how hard that your computer works.

    The fact is if your processor can do X calculations per second it is allowed to do less than that if it finishes the job. And very frequently your processor isn't working at 100%. That would make it very hot. (If you want terrible stories about what heat can do to a computer I'd be happy to tell you.) Even if it is working at 100%, is that all for your program? Hopefully not. That makes the rest of the operating system unstable.

    You could probably inspect/compile some stdio.h implementations down to assembler if you want and determine roughly the ops it actually takes to finish, say printf() or write(), but you won't do that on your own anyway. If I were you, I would just accept the way things are. It's the easiest thing for right now. You really would feel like you were being distracted if you looked into it any more than this.

  10. #10
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by ADVANCESSSS View Post
    Finally, using c++, and manipulating a COMPUTER, I notice something strange. Why, when I set up a infinite loop to for ex. increment a number or show the same identical text over and over in the command box, I repeat why, does it only do around 80 calculations per second?(80 texts appear per sec ONLY!!)! When transistors in computers can turn on/off trillions of times per second? Did, the founders, of the computer, choke, the real speed?
    Try printing only every 100th iteration or every 1000th iteration. It's likely the act of printing that's slowing it down. A video monitor typically has a refresh rate of 60-240Hz, and that refresh rate is likely going to limit the speed of your program, if you're writing to the screen every time, not to mention the computational cost and inherent latency of manipulating hardware.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  11. #11
    Registered User
    Join Date
    Jun 2015
    Posts
    1,640
    The real question is why are we assuming the accuracy of the "80 lines per second" statement? How is the OP timing/counting that? It's more likely that his console only retains the last 80 lines and that's what's confusing him.

  12. #12
    Registered User
    Join Date
    Apr 2006
    Posts
    2,149
    Quote Originally Posted by whiteflags View Post
    Your computer is electrical, it does not use light as energy, so how fast a photon travels in space is entirely divorced from the speed of your personal computer.

    If you intend to call yourself a genius in science, you should know that this is a basic mistake. Photons and electrons are different things.
    Quote Originally Posted by MutantJohn View Post
    Keep in mind, I think it's impossible for anything with mass to actually hit light speed. And electrons have mass.
    Actually does travel at light speed. Electric signals propagate at light speed through wires, although the speed of light through a wire is less than in a vacuum. Electrons move in a wire as well, but at a rate slower than your car!

    However, the speed of your computer is limited by something more complicated: how long it takes the transistors in your CPU to change from 0 to 1.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

Popular pages Recent additions subscribe to a feed

Tags for this Thread