00:03:20  <mjrosenb_>because stepping through it gives me a better idea of what it is doing than just looking at it
00:04:52  <mraleph>yeah, I understand that was rhetorical question :-) I prefer to step through in my mind...
00:05:03  <mraleph>different approaches
00:06:46  <mraleph>was it something in particular that you were trying to grok by stepping through the code?
00:17:08  <mjrosenb_>yeah, how v8 is so fast :-p
00:18:35  <mraleph>ooook
00:19:14  <mraleph>(ok, that sounded like Librarian)
04:15:11  * C-Manquit (Quit: Connection reset by beer)
04:36:38  * TheJHjoined
05:47:27  * alex4nderquit (Ping timeout: 260 seconds)
05:48:36  * alex4nderjoined
06:12:04  * TheJHquit (Ping timeout: 252 seconds)
07:20:24  * [[zzz]]joined
07:23:54  * [[zz]]quit (Ping timeout: 276 seconds)
07:48:47  * tmcguirejoined
08:42:16  * btraskquit (Quit: btrask)
09:18:26  * mralephquit (Quit: Leaving.)
09:24:22  * c4milojoined
09:28:41  * c4miloquit (Ping timeout: 255 seconds)
09:58:53  * Net147joined
11:11:46  * c4milojoined
11:15:58  * c4miloquit (Ping timeout: 245 seconds)
11:47:16  * C-Manjoined
12:58:26  * c4milojoined
13:02:38  * c4miloquit (Ping timeout: 245 seconds)
13:20:15  * [[zzz]]changed nick to [[zz]]
13:31:29  * Net147quit (Quit: HydraIRC -> http://www.hydrairc.com <- *I* use it, so it must be good!)
14:10:08  * bnoordhuisjoined
14:16:32  * c4milojoined
14:55:19  * c4miloquit (Read error: Connection reset by peer)
14:55:49  * c4milojoined
15:01:30  * jmar777joined
15:02:38  <jmar777>is this channel intended for v8 questions, or more for v8 development?
15:02:58  <guor>I guess questions, though not a lot is happening around here anyways
15:04:03  <jmar777>i'm looking for a way to do efficient bitwise operations, and am curious if v8 _always_ requires doing some sort of float -> integer -> float conversion, or if in some cases the conversion isn't necessary
15:04:14  <jmar777>i.e., if i do `4 | 2`, were there any conversions involved?
15:04:58  <jmar777>and on a related note, I was wondering if typed arrays were bringing anything new to the table in that regard
15:06:15  <guor>I'd assume that both are stored as tagged integers to begin with, and bitwise or should be rather efficient here
15:07:09  <guor>if the code gets optimized, in some cases we use untagged integers internally, which makes it even more efficient
15:07:28  <guor>if in doubt, run it with --print-code and see for yourself
15:12:25  <jmar777>guor: cool, i'll do some more digging. thanks
15:13:03  <guor>maybe it helps to run d8 with --help and grep for "print"
15:20:19  <jmar777>maybe i'll see how --always_full_compiler impacts it
15:21:15  <guor>I don't think that's what you want to do
15:21:40  <guor>if you don't want optimized code
15:21:42  <jmar777>ha. i figured it had a 50/50, so i threw it up in here :)
15:21:46  <guor>run --nocrankshaft
15:21:51  <jmar777>i do want optimized code
15:21:53  <jmar777>i think
15:21:56  <guor>I see
15:22:07  <guor>you should just run the code in a tight loop repeatedly so that it will get optimized
15:22:52  <guor>and then use --print-opt-code and --code-comments
15:23:10  <guor>it tells you what assembly code the compiler produces
15:24:20  <jmar777>gotcha. the context for this is i wrote a reasonably fast data-structure for finding possible words you can make using a set of provided characters (scrabble style)
15:24:56  <jmar777>it's kind of like a trie, but each letter is assigned a number instead, so the entire search operation only involves bitwise operations
15:25:30  <jmar777>runs pretty fast, but my buddy ported it to scala, which runs about an order of magnitude faster, which seems too much once the javascript version has been optimized
15:25:32  <guor>I see. Usually I would assume that V8 does it pretty well, if your data structure is reasonably typed, i.e. no unnecessary polymorphisms
15:25:51  <guor>you can check whether V8 has problems with the optimized code by --trace-deopt
15:26:13  <guor>if there are any, then V8 made assumptions for the optimizing compiler that turned out to be wrong later, so we had to go back to slow code
15:27:05  <guor>bitwise operations are usually pretty fast if the integers involved are less than 2^30
15:27:08  <jmar777>guor: cool, i'll try that. it's a pretty small script, so i may try to rewrite it such that no temporary objects are created as well, and ditch gc
15:27:38  <jmar777>guor: ya. it's just each letter of the alphabit, so it only has 0-25
15:27:43  <jmar777>*alphabet
15:27:47  <guor>integers less than 2^30 don't cause allocation, so there is no gc
15:27:57  <guor>unless you allocate a bunch of arrays all the time for some reason
15:28:03  <guor>you can check for GC with --trace-gc
15:28:21  <jmar777>guor: interesting... is that like an interning style optimization?
15:28:38  <jmar777>sorry for all the q's. i have ~zero awareness of how v8 operates
15:28:57  <guor>sort of. we try to keep integers as is and not allocate object wrappers for them
15:29:07  <guor>np
15:30:13  <jmar777>so, if my goal was to basically write a script that didn't require gc, and was compiled as aggressively as possible, what flags should I be looking up?
15:30:57  <jmar777>does --expose_gc disable the normal gc behavior, or does it simply allow you to invoke it at will on top of when v8 schedules it?
15:31:16  <guor>the latter
15:31:23  <jmar777>k
15:31:38  <guor>it's not recommended, but if you specify it, you can use gc() inside javascript code to invoke a gc
15:32:14  <jmar777>guor: right. i think that would primarily be useful to me if that gave me the option to simply never have gc run (or perhaps just after the structure was initialized)
15:32:19  <guor>though it's probably better to just file a bug if you observe some very suboptimal gc behavior than try to do it by yourself
15:32:58  <jmar777>guor: right. in general it behaves like a champ from what i can tell. script already runs 1000 times faster than i need... more academic than anything else at this point
15:33:05  <guor>V8's gc runs on demand and not periodically, so if you don't allocate a lot of objects, nothing is going to happen
15:33:32  <jmar777>guor: nice - that should work perfect then
15:33:40  <jmar777>thanks again
15:33:45  <guor>np
15:37:31  * c4miloquit (Remote host closed the connection)
15:38:50  * c4milojoined
15:38:57  * RT|Chatzillaquit (Quit: ChatZilla 0.9.86.1 [Firefox 2.0.0.22pre/2009081014])
15:40:05  * tmcguirequit (Quit: Bye!)
15:49:41  * TheJHjoined
15:55:38  <sanjoyd>guor: doesn't v8 do incremental marking (ref. V8's gc runs on demand and not periodically)?
15:56:39  <guor>That's true
15:56:53  <guor>then again I don't think it matters in this case. It probably won't even turn on
15:56:59  <guor>also, hi sanjoy :)
15:57:26  <sanjoyd>guor: yang?
15:57:33  <guor>yup :)
15:57:38  <sanjoyd>Ah, I guessed. :)
16:24:30  * TheJHquit (Ping timeout: 260 seconds)
16:26:16  * TheJHjoined
17:57:39  * c4miloquit (Remote host closed the connection)
19:56:38  * c4milojoined
21:33:34  * jmar777quit (Remote host closed the connection)
22:24:38  * RT|Chatzillajoined
23:10:16  * c4miloquit (Remote host closed the connection)
23:49:07  * TheJHquit (Read error: Operation timed out)