| Author |
Timed 4 python optimising |
jjbutler88
Colemak User

Posts: 590
Location:
Joined: 22.04.07 Rank: Guru |
|
Ok, so far the challenges have been pretty lax on time allowed to return the answer. Im now on timed 4, and have written a python scblockedript which (i believe) returns the correct answer. Im getting errors when I submit it though, telling me its either wrong or too late. So I checked my answers and they seem ok, the only thing it can be is the time.
I imported python's time module and took 2 readings, one just before my http request and one just after. Got about 4.5 seconds back. I do have an ugly for..if..elif statement in the middle, but even with this commented out i'm still at 3.5.
Does anyone know any good techniques for optimizing python code? Dont really want to do it in C, im getting on well with python.
Cheers
|
|
| Author |
RE: Timed 4 python optimising |
slpctrl
Member
Posts: 945
Location: 2147483647
Joined: 19.04.07 Rank: God |
|
Might be traffic, always best to do the timed challenges when the fewest people are on. Then again I did mine in curl (haven't done 4 though :\ ) But try again when fewer people are on.
|
|
| Author |
RE: Timed 4 python optimising |
jjbutler88
Colemak User

Posts: 590
Location:
Joined: 22.04.07 Rank: Guru |
|
Yeah, im on wireless as well, im gonna try plugging straight into my router with my laptop. Mind you that has a much slower proc, will this influence things much?
|
|
| Author |
RE: Timed 4 python optimising |
slpctrl
Member
Posts: 945
Location: 2147483647
Joined: 19.04.07 Rank: God |
|
Anything that will slow your connection down will effect the time you take. You could try it on a free PHP host (donno if they CURL installed though).
|
|
| Author |
RE: Timed 4 python optimising |
SwartMumba
Member

Posts: 292
Location: TX <--- I'm here
Joined: 18.09.07 Rank: Uber Elite |
|
I don't mind taking a look at your scblockedript and seeing if I can help.
|
|
| Author |
RE: Timed 4 python optimising |
jjbutler88
Colemak User

Posts: 590
Location:
Joined: 22.04.07 Rank: Guru |
|
PM sent swartmumba
|
|