Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#26 2018-04-30 03:12:17

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: How quickly could you get rid of three hudred thousand limes?

class Lime:
    pass

limes = []

def limify():
    limes = [ Lime() ] * 300_000

def get_rid_of_limes():
    for lime in limes:
        del lime

if __name__ == '__main__':
    import timeit
    limify()
    print(timeit.timeit("get_rid_of_limes()", setup="from __main__ import get_rid_of_limes", number=1))

I've done some experiments and according to my tests, it takes around 7-9 microseconds to get rid of three hundred thousand limes.


signature.png
*u stinky*

Offline

#27 2018-04-30 03:38:56

Onjit
Member
Joined: 2015-02-15
Posts: 9,707
Website

Re: How quickly could you get rid of three hudred thousand limes?

XxAtillaxX wrote:
class Lime:
    pass

limes = []

def limify():
    limes = [ Lime() ] * 300_000

def get_rid_of_limes():
    for lime in limes:
        del lime

if __name__ == '__main__':
    import timeit
    limify()
    print(timeit.timeit("get_rid_of_limes()", setup="from __main__ import get_rid_of_limes", number=1))

I've done some experiments and according to my tests, it takes around 7-9 microseconds to get rid of three hundred thousand limes.

well lime is the universal hacker text colour so it makes sense...


:.|:;

Offline

#28 2018-04-30 17:18:16

some woman
Member
From: 4th dimension
Joined: 2015-02-15
Posts: 9,289

Re: How quickly could you get rid of three hudred thousand limes?

Hold on, what constitutes "getting rid of" exactly? Can you just walk away from the limes and say "these aren't mine, I have nothing to do with them?"


10 years and still awkward. Keep it up, baby!

Offline

#29 2018-04-30 17:56:09

Enurp
Formerly ThuggishPrune
From: Ohio
Joined: 2015-06-20
Posts: 459

Re: How quickly could you get rid of three hudred thousand limes?

Can we eat the limes

Offline

#30 2018-05-01 00:15:20

Onjit
Member
Joined: 2015-02-15
Posts: 9,707
Website

Re: How quickly could you get rid of three hudred thousand limes?

yes


:.|:;

Offline

#31 2021-09-15 12:02:44

Onjit
Member
Joined: 2015-02-15
Posts: 9,707
Website

Re: How quickly could you get rid of three hudred thousand limes?

this thread is now closed

goodbye


:.|:;

Offline

Onjit1631617364791339

Board footer

Powered by FluxBB

[ Started around 1714375040.488 - Generated in 0.039 seconds, 13 queries executed - Memory usage: 1.4 MiB (Peak: 1.5 MiB) ]