[01:39:32] --> Kirben has joined #pentagram
[01:39:32] --- ChanServ gives channel operator status to Kirben
[02:53:28] --- Darke|zzZ is now known as Darke
[08:21:54] <-- Darke has left IRC (capek.freenode.net irc.freenode.net)
[08:22:14] --> Darke has joined #pentagram
[09:30:52] <Darke> A fundamental logical axiom: Line numbers, do not have line numbers, other then their own line number.
[10:18:54] <Darke> Hmm... I think I've got the line numbers right now... at least they're not painfully, obviously wrong.
[10:22:29] <Darke> Admittedly, the output looks painfully ugly, but that's something to fix later. *grin*
[12:03:23] * Darke adds a configure flag to spit out profiling data and finds that 26 calls to DataType::print_value_unk is using up 100% of the programs execution time. He thinks either he's doing _something_ wrong, or he needs more test data. Probably the latter.
[12:14:57] --> Colourless has joined #Pentagram
[12:14:57] --- ChanServ gives channel operator status to Colourless
[12:15:27] <Darke> Ahh... more... err... 'useful' data. Apparently the internal profiling functions are taking about 80% of the time, the rest of the time is taken up by the Console:: functions (which use 15%ish), and the rest (5%) is... err... fold. *blinkie*
[12:16:26] * Darke is wondering if he's done the impossible, or just done something wrong...
[12:17:15] <Colourless> well what is the problem?
[12:18:04] <Darke> Err... it's too fast?
[12:18:33] * Darke is not really sure that's a 'problem' per se though...
[12:19:14] * Darke tries disasm...
[12:20:28] <Darke> Cool. No, the numbers are right, or at least within logical limits. About 80% of the time in disasm is (logically) taken up by Console:: functions, so the 15:5 ratio makes sense.
[12:21:48] <Darke> Console::PrintInternal seens to be taking up the most time. I wonder if there's any easy optimisations. *grin*
[12:22:18] <Colourless> probably
[12:22:31] <Colourless> just cutting out word wrapping will probably improve things
[12:23:08] * Darke notes he _is_ doing this just to avoid working on twisting those odd jne/jmp sequences into something sane. It's of no 'real' importance. *grin*
[12:23:11] <Colourless> try adding in console.DisableWordWrap() somewhere at te start of the file
[12:23:45] <Colourless> (the file being more specifically main() in disasm.cpp)
[12:24:34] <Darke> Yup. *grin*
[12:26:24] <Darke> Console::Printf dropped down to 5% from 15%, but just_print appeared out of nowhere to be 15% and Console::PrintInternal remained the same. It did run quicker though. *grin*
[12:26:42] <Darke> Console::PrintInternal is 65%ish.
[12:29:47] <Colourless> just how much crap are you attempting to dump to the console anyway?
[12:30:43] <Darke> I wonder if it's worth having two PrintInternal functions, one called if line wrapping is on, one if off. You'd remove all the if statements (I think) from the tight loop learing only the switch for the 'wordwarp off' one.
[12:31:05] <Colourless> i actually find the slowest thing on my system is actually windows updating the display, not anything we do. piping the output to a file is 'really' fast
[12:31:16] <Darke> The entire disassembly of remorse's usecode? *grin* This is what Console was designed for, wasn't it? *grin*
[12:31:21] <Colourless> disassembling the entire file takes a cupple seconds
[12:31:32] <Colourless> s/cupple/couple/
[12:31:37] * Darke nods. He's piping the output to /dev/null for these test.
[12:33:08] <Colourless> it takes me 3 seconds to run
[12:33:08] <Colourless> disasm.exe crusader\NoRemorse\usecode\eusecode.flx -a > nul
[12:33:10] <Darke> I'm just amused that considering how ucxt 'performed' (hint: it didn't), that decompiling is taking almost no time in comparison to just outputting the result. *grin*
[12:34:19] <Darke> Same on mine, with profiling.
[12:34:48] <Colourless> without put it's taking well over a minute to do
[12:35:05] <Colourless> i really don't think that optimzing the console functions is going to do a great deal in the scheme of things :-)
[12:35:21] <Colourless> s/without put/with output/
[12:36:32] <Darke> Probably not. *grin*
[12:36:40] <Colourless> hell, just put a return statement in the start of Console::PrintInternal
[12:37:04] <Colourless> still takes about 2 seconds to disassemble the entire file
[12:39:09] * Darke snickers. Console:: is still taking 50% of the execution time, but yes it's quite a bit quicker. *grin*
[12:39:33] <Colourless> now, try putting a return statement at the top of Console::Printf()
[12:40:50] <Darke> Oooh. Much faster. A little over a second. *grin*
[12:42:12] <Darke> Yay, readfunction is _actually_ taking a significant amount of time now, 33%. *grin*
[12:43:37] * Darke makes a mental note to do that when he's properly trying to profile fold. He can actually get some useful information out of it now. *grin*
[12:44:20] <Darke> Wow. Pagan takes quite a bit longer 3.6 seconds.
[12:44:29] <Colourless> you should know, there is a reason i've got a console.Print() as well as console.Printf(). Print() doesn't have to worry about all that args crap and should be significantly faster
[12:44:54] <Colourless> of course Print() can only output a simple string
[12:45:29] * Darke nods and has been using Print and even Putchar when he can. *grin*
[12:46:19] <Colourless> Putchar is 'optimized' (i.e. it gets buffered before calling PrintInternal)
[12:48:11] * Darke noddles.
[12:55:05] <Darke> There's no particular reason to give a list of external function calls on a function basis, rather then a file basis, is there?
[12:55:23] <Colourless> i really wouldn't think so
[12:56:27] <Darke> Actually, we weren't going to use them anyway, weren't we? Although they would be useful for us to determine the number and type of parameters that get passed to each function/intrinisic.
[12:57:00] <Colourless> i don't really know what you are talking about now
[12:58:21] <Darke> Lines like `extern ClassName::FuncName(param1type param1, ...);` in each class file. Weren't we talking about doing run-time linking, rather then compile time linking?
[12:58:29] <Darke> s/doing/trying to do/
[12:58:43] <Colourless> yes run time
[13:48:01] <Darke> `word class_0A0C_function_002C(word, word);` The phrase, "Wow, that's unbelievably detailed" crosses my mind. *grin*
[13:50:05] <Darke> The intrinsics aren't much better. But at least there's more of them.
[13:51:05] <Colourless> :-)
[13:56:50] * Darke needs to do that... umm... what's it called, something about datatype flow? Where you propogate the type at the leaves ("it's a string pushed as a word") though the transient nodes ("now it's a dword sized char*") back to the original calls, ("I'm popping a dword which is a char*").
[14:05:57] * Darke bleahs and thinks someone really needs to go through Disasm.cpp and rename all the 'func's to 'class', since it's still carrying our original minomer. *grin*
[14:13:49] <Darke> The entirity of a function is everything between the 'current' 7A (or 79 for U8) and the most recent 5A. I think. *eartwitch* This should also be valid for spawn inlines too, not that I have to worry about them for a while.
[14:41:10] * Darke wonders what happens with call/calli functions that return a value, that isn't used. Like the perpetually forgotten return value to printf(). *grin* Is the appropriate push/retval opcode just not inserted? Is it inserted but popped into a 'temp' value (or pop/temp? Though that's normally used in the suspend/imply or loopnext contexts).
[15:15:50] * Darke ponders the fundamental philosophical question as to whether if a rabbit rambles in an irc channel, is he really rambling? After all, he could be expounding on the Question to the Answer to the Meaning of Life, The Universe and Everything, yet if no one was paying any attention, no one would notice?
[15:43:34] <-- Kirben has left IRC (Read error: 54 (Connection reset by peer))
[15:51:45] <Colourless> someone would eventually read about it
[15:52:13] --> wjp has joined #pentagram
[15:52:13] --- ChanServ gives channel operator status to wjp
[16:48:50] <Darke> Mental note: if/else loops are characterised by the following opcode structure: `jne XXXX; (code here); jmp YYYY; (offset XXXX here); (more code here); (offset YYYY here);`
[16:49:20] <wjp> I wouldn't call that a 'mental' node :-)
[16:49:25] <wjp> s/node/note/
[16:50:04] <Colourless> you shouldn't use the word 'node' it will just confuse the bunny even more :-)
[16:50:11] <Darke> It is for me, since I need to remember it in the morning, and with the state of my mind as it is, I'm not likely to remember it as a 'thought' mental note, so an electronic mental note will have to surfice. *grin*
[16:50:40] * Darke sets up a pointer to a ColourlessNode and de-references it.
[16:51:05] * Colourless seg faults
[16:51:23] * wjp traps that segfault and reboots Colourless
[16:51:40] <wjp> those Windows users always need maintenance... *sigh* ;-)
[16:51:49] * Darke giggles.
[16:52:45] * Colourless chimes announcing that he is now back online
[16:52:55] <wjp> lol
[16:53:17] * Colourless still does even more initialization despite the fact that he has signal that he is online
[16:53:20] * wjp starts Colourless' control panel and disables the startup sound
[16:53:30] * Darke turns off Colourless' startup sound.
[16:53:43] * Colourless has user error
[16:53:52] <Darke> Hmm... nice to see I'm not the only one who... dislikes it. *grin*
[16:54:57] * Colourless 's shell restarts
[16:55:15] <Colourless> ah, back... finally
[16:55:21] <wjp> wb :-)
[16:56:26] * Darke snickers.
[16:57:24] <Colourless> probably a good thing you disabled that sound. I'd hate to get a kmode exception because of some buggy sound drivers :-)
[17:04:22] <wjp> :-)
[17:59:35] * Darke wanders off to sleep, before sleep wanders over and drags him away kicking and screaming. *grin* Night!
[17:59:53] <Colourless> cya
[17:59:56] --- Darke is now known as Darke|zzZ
[19:29:24] <-- Colourless has left IRC ("casts invisibility")
[22:26:31] <-- wjp has left IRC ("Zzzz...")