code logs -> 2009 -> Sun, 26 Jul 2009< code.20090725.log - code.20090727.log >
--- Log opened Sun Jul 26 00:00:00 2009
--- Day changed Sun Jul 26 2009
00:00
<@Derakon>
Over 13s of runtime, 7s in PhysicsObject.update, 4.2s in rebalancing the quadtree, and the rest in loading assets. This is no good.
00:08 You're now known as TheWatcher[T-2]
00:09 Attilla [~The.Attil@92.1.240.ns-2748] has joined #code
00:09 mode/#code [+o Attilla] by ChanServ
00:11 You're now known as TheWatcher[zZzZ]
00:25 * Derakon ponders if there's some way to get cProfile to generate some kind of colorized source code output that tells him cleanly how his time is being spent in a more heirarchical fashion than the basic profiler output does.
00:26
<@Derakon>
Like, the report tells me that I'm spending 3.566s in and under Sprite.getBounds, but how much of that is from collision detection vs. from rebalancing the quadtree?
00:39 AnnoDomini [AnnoDomini@Nightstar-29146.neoplus.adsl.tpnet.pl] has quit [Quit: Oh hai. In teh beginnin Ceiling Cat maded the skiez An da Urfs, but he did not eated it.]
00:59
<@Derakon>
Woot, fixed it!
00:59
<@Derakon>
Went from 45 objects causing the game to choke and die a horrible death to 45 objects causing no noticeable slowdown whatsoever. :)
01:05
<@Derakon>
...I spoke too soon. Things were fast because I was dropping objects on the floor.
01:22 * Bobsentme stifles a giggle
01:22
< Bobsentme>
Still better than me. I can't even get a system ping to work in Qt Creator
01:22 Consul [~Consul__@Nightstar-2425.dsl.sfldmi.ameritech.net] has quit [Ping Timeout]
02:10 Consul [~Consul__@Nightstar-2425.dsl.sfldmi.ameritech.net] has joined #code
02:10 mode/#code [+o Consul] by ChanServ
02:27 Attilla [~The.Attil@92.1.240.ns-2748] has quit [Quit: ]
02:39 Thaqui [~Thaqui@121.98.166.ns-22683] has joined #code
02:39 mode/#code [+o Thaqui] by ChanServ
02:39 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
03:01 * Derakon fixes the dropping of objects on the floor, goes back to figuring out why things are so slow.
03:22
<@Derakon>
Blargh. I hate the prospect of just converting all this stuff over into C/C++, but I'm not seeing any obvious sources of slowdown.
03:23
<@Derakon>
This function's taking .906s over 16073 calls, just in itself (i.e. disregarding calls to other functions), and I don't know why. http://paste.ubuntu.com/233587/
03:24
<@Derakon>
It's also taking about half of the overall runtime, when counting calls to other functions made by it.
03:31
<@Thaqui>
Well, it may not be the function that's the problem but unnecessary calls?
03:43
<@Vornicus>
A fun little math problem: to get the coefficients etc of an arbitrary polynomial given a bunch of results from xs you choose, you need degree + 1 points: once you get a value that is expected, you can stop. How many points do you need if the coefficients are restricted to nonnegative integers?
03:44
<@Derakon>
What do you mean by "given a bunch of results from xs as you choose"?
03:45
<@Vornicus>
I have a polynomial function f(x).
03:45
<@Vornicus>
It's a black box though; you can giveit an x and it will return the y.
03:45
<@Derakon>
Ahh, empirically-derived results.
03:56
<@Vornicus>
Eh. I'll give you the answer: 2. Now all you have to do is figure out why.
03:59
<@Derakon>
Well, 2 is clearly enough to establish if the function is linear.
04:00
<@Derakon>
But it shouldn't be sufficient for anything *more* than that.
04:01
<@Derakon>
Is there a constant term?
04:01
<@Derakon>
That is, c_0 * x^0?
05:18 * Derakon installs Cython, notes that one of the log lines that goes by is "Picking lexicon..."
05:42
<@Consul>
Yeah, Cython doesn't like installing on Windows.
05:42
<@Consul>
At least, not unless you compiled Python from scratch yourself.
05:49
<@Consul>
Ah, there it goes. I finally got it pointing to mingw
05:50
<@Consul>
Looks like it's installed.
05:52 * Derakon looks up, notes he made a typo. It was "Pickling lexicon...".
05:53
<@Derakon>
In any event, my goal was to do some speed tests comparing the pure-Python Vector2D class and a Cython version. Sadly, Cython doesn't seem to like my use of __new__ instead of __init__.
05:58
<@Consul>
Well, my install seems to work.
05:59
<@Consul>
We'll see if this plus pyVST makes for some interesting stuff.
05:59
<@Consul>
Which is as yet unfinished, actually.
06:02 Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Connection reset by peer]
06:03
<@Derakon>
Hah. Rudimentary test has the pure-Python version being .01s *faster*, in a loop that instantiates some 1 billion Vector2D instances.
06:03
<@Derakon>
Mind you, I'm not really using Cython to its full extent here.
06:11
<@Derakon>
Argh, I have to recompile the code after changing it! >.<
06:11
<@Consul>
Welcome to the world of C. :-P
06:14
<@Derakon>
I'm not glad to be back.
06:15
<@Derakon>
The Cython docs really, really need a simple example of a class written entirely in Cython.
06:25 Derakon is now known as Derakon[AFK]
06:26 Derakon[AFK] [~Derakon@Nightstar-5824.hsd1.ca.comcast.net] has quit [Quit: This computer has gone to sleep]
07:32 Vornicus is now known as Vornicus-Latens
08:15 AnnoDomini [AnnoDomini@Nightstar-29264.neoplus.adsl.tpnet.pl] has joined #Code
08:15 mode/#code [+o AnnoDomini] by ChanServ
08:43 Thaqui [~Thaqui@121.98.166.ns-22683] has quit [Client exited]
10:09 Attilla [~The.Attil@92.1.240.ns-2748] has joined #code
10:09 mode/#code [+o Attilla] by ChanServ
10:25 You're now known as TheWatcher
10:53 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
10:53 mode/#code [+o gnolam] by ChanServ
11:06
< Orthia>
What is Cython?
11:29 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
11:36 * gnolam guffaws.
11:36
<@gnolam>
http://support.microsoft.com/default.aspx?scid=kb;en-us;297830 <- "More information"
11:43 * AnnoDomini laughs out loud.
14:40 Explorer [Explorer@88.235.124.ns-11209] has joined #code
14:40 TarinakyKai [~Tarinaky@Nightstar-16638.plus.com] has joined #code
14:40 Explorer [Explorer@88.235.124.ns-11209] has left #code []
14:42 Tarinaky_ [~Tarinaky@Nightstar-16638.plus.com] has quit [Ping Timeout]
16:08 Syloqs_AFH [~Syloq@Admin.Nightstar.Net] has joined #code
16:09 Syloqs_AFH is now known as Syloqs-AFH
17:04 Derakon [~Derakon@Nightstar-5824.hsd1.ca.comcast.net] has joined #code
17:04 mode/#code [+o Derakon] by ChanServ
17:25 SmithKurosaki [~Smith@Nightstar-10671.dsl.teksavvy.com] has quit [Client exited]
17:27 SmithKurosaki [~Smith@Nightstar-10671.dsl.teksavvy.com] has joined #code
17:27 mode/#code [+o SmithKurosaki] by ChanServ
17:51
<@ToxicFrog>
Orthia: it's a language for writing Python C extensions in.
17:51
<@ToxicFrog>
It looks similar to Python, but is statically typed and lets you call C code directly; at compile time it's translated into C.
18:01 * gnolam stabs non-free standards with a rusty, tetanus-coated shiv.
18:05 * gnolam also stabs free-but-impossible-to-navigate standards.
18:20 Derakon is now known as Derakon[AFK]
18:25 * ToxicFrog joins in
18:57 Derakon[AFK] is now known as Derakon
19:11
<@gnolam>
The City of Boston hands out free cyber security advice: http://www.liquidmatrix.org/blog/wp-content/uploads/2009/06/screencap.png
19:12
<@gnolam>
(Tip #6)
19:18
<@ToxicFrog>
Snrk
19:33
<@SmithKurosaki>
Wow
20:17
<@Vornicus-Latens>
Der: two is enough for things with positive integer coefficients - you just have to use that fact carefully.
20:25 * Vornicus-Latens writes a q&d polynomial evaluator in five lines: def evaluate_polynomial(coefficients, x): y = 0; for coefficient in coefficients: y = y * x + coefficient;; return y
20:32
<@Vornicus-Latens>
...which, actually, if you recognize the inner loop there, gives it away.
20:37 Vornicus-Latens is now known as Vornicus
20:48 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has joined #code
22:30 Vornicus [~vorn@ServicesOp.Nightstar.Net] has quit [Quit: Leaving]
22:34 Vornicus [Vornicus@Admin.Nightstar.Net] has joined #code
22:34 mode/#code [+o Vornicus] by ChanServ
23:24 Reiv [~82d94c4d@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #Code
23:54 AnnoDomini [AnnoDomini@Nightstar-29264.neoplus.adsl.tpnet.pl] has quit [Quit: ACHTUNG! ALLES LOOKENSPEEPERS! Das Internet is nicht fuer gefingerclicken und giffengrabben. Ist easy droppenpacket der routers und overloaden der backbone mit der spammen und der me-tooen. Ist nicht fuer gewerken bei das dumpkopfen. Das mausklicken sichtseeren keepen das bandwit-spewin hans in das pockets muss; relaxen und watchen das cursorblinken.]
--- Log closed Mon Jul 27 00:00:48 2009
code logs -> 2009 -> Sun, 26 Jul 2009< code.20090725.log - code.20090727.log >