Similar Posts

10 Comments

  1. I’m a n00b and usually use bash for my scripting. Is this powershell? Vbs?
    How can I utilise this script to show my kids that we don’t in fact need to leave the computer on to count to a quadrillion?
    Thx!
    Great idea!
    Neil

  2. Hi Neil, I’ve done this in a C# Console Application using Visual Studio. If you don’t have VS & want to download it – the Community edition is free.

    But I guess you can achieve the same in any language.
    1. You get the current date&time / timestamp
    2. You create a for loop & iterate (count-up) to 1.000.000
    3. You get a new timestamp & make the difference with the current one. This will tell you how much it took your computer to count up to 1 million.

    From here on it’s just a matter of multiplying the value you got & extrapolate how much it would take to count up to a quadrillion. If you want a very accurate value you can ofc try & let the computer count up to a quadrillion.

  3. 15 seconds to 1 billion seems a bit slow, surprised by this result but it depends on what CPU you are using? I do a loop count to 1 billion using VB 2017 on my Lenovo laptop running a 7th gen Core I3 7020U Cpu and the result is 2.98 seconds using a 32bit integer. 32bit Floating Point takes a second longer.

  4. How long would it take to count by computer to nonillion?

  5. I don’t think you can just count to 1M and extrapolate by multiplying by 1000 over and over again. you need to count to 1M, then count to 1B, then see if t2 is 1000 x t1. Do the same when you count to 1T and see if t3 is 1000 x t2. If the numbers are ok then you can extrapolate, otherwise you need to take into account the average increase of time as you increase the number of zeros.

  6. Alexander says:

    def create5darray(x,y,z,w,a):
    MEP = np.zeros(shape=(x*y*z*w*a), dtype=int)
    MEP = list(MEP.reshape(x,y,z,w,a))
    return MEP

    st = time.time()
    X = create5darray(100,100,100,100,10)
    print(100*100*100*100*10)
    et = time.time()
    print(et-st)

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you a human? *