Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2013-10-15

| Channels | #pdl index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:20 drrho joined #pdl
02:06 drrho joined #pdl
04:15 drrho joined #pdl
04:52 drrho joined #pdl
06:01 drrho joined #pdl
08:23 drrho joined #pdl
10:05 drrho joined #pdl
11:20 drrho joined #pdl
12:50 ribasushi joined #pdl
12:57 ribasushi bah
12:57 ribasushi I am that scary
12:57 Mithaldu ahaha
13:09 run4flat joined #pdl
13:22 Mithaldu run4flat: ribasushi wants to talk to you i think
13:25 run4flat Mithaldu, where can I find ribasushi?
13:25 * Mithaldu points at ribasushi
13:25 Mithaldu right there
13:25 ribasushi run4flat: tried looking behind the couch?
13:25 run4flat ribasushi, you sly dog you
13:25 run4flat what's up?
13:25 * run4flat wonders why ribasushi didn't just say hi
13:26 ribasushi run4flat: I noticed on bpo you claimed C::XSA is faster than direct-hash-access
13:26 run4flat just quoting what I read in the C::XSA docs
13:26 ribasushi run4flat: oh, because the moment I joined the channel you dropped off )
13:26 run4flat I have not used it myself
13:26 run4flat so no, I can't back that up with my own benchmarks
13:26 * ribasushi goes to look where it says that... that' be quite idiotic
13:27 run4flat just spreading confidence, certainty, and... certainty
13:27 run4flat (rather than fear, uncertainty, and doubt)
13:27 run4flat (even if what I'm saying is complete BS)
13:28 run4flat http://search.cpan.org/~smueller/Class-​XSAccessor-1.18/lib/Class/XSAccessor.pm
13:28 run4flat then search for benchmark
13:28 run4flat oh, I see, I mis-spoke
13:28 run4flat it's faster than a pure-perl accessor
13:28 run4flat not a direct hash accessor
13:28 run4flat my bad
13:28 run4flat I can fix that
13:29 ribasushi run4flat: right, basically this has nothing to do with CXSA (which is awesome), it has to do with perl's function invocation (as a whole) which is *insanely* slow
13:29 ribasushi I could not believe my benchmarks when I first encountered the issue
13:30 run4flat I think that Yuki is pointing at something that would be nice to optimize in Perl
13:30 run4flat but not trivial
13:30 run4flat if even possible
13:30 * run4flat has not looked into the method dispatch code
13:30 ribasushi a lot of my work on DBIC earlier this year involved folding away method calls, which at places gave me ~20x speedups (no joke)
13:30 ribasushi it's not the method dispatch (which is cached eventually)
13:30 Mithaldu ribasushi: ever seen my lifevis code?
13:31 ribasushi it is the entersub itself
13:31 run4flat ah, ok
13:31 run4flat preparing the stack and all that, right?
13:31 run4flat and that's where XSAccessor saves, is by avoiding the entersub
13:31 ribasushi run4flat: yes, and while tsee circumvents most of it in CXSA, it is still mostly there
13:31 run4flat hmm
13:31 ribasushi no, you *can't* avoid an entersub entirely
13:31 ribasushi he just supplied his own
13:32 run4flat this is very interesting because I've been thinking about how to use C::TinyCompiler to build OPs instead of xsubs
13:32 ribasushi but there is bootstrap code calling the entersub (out of his control) which still costs tremendously
13:32 run4flat and I wonder if it'll be a bigger win than I had anticipated
13:32 * run4flat ponders
13:33 run4flat bah, to fix my post I'll have to login
13:33 run4flat which means looking up my password
13:33 Mithaldu ribasushi: so what does entersub do?
13:33 run4flat and I feel a bit too lazy to do that at the moment
13:33 run4flat ribasushi, should I go through the extra effort to fix my comment?
13:33 run4flat or just let it stand so as to encourage Yuki to look into XSAccessor?
13:34 ribasushi run4flat:  even the benefits of a loop-to-op tree converter will reap unimaginable benefits, so please do look into that
13:34 ribasushi we are not talking percentages, we are talking magnitude orders
13:35 ribasushi run4flat: meh, it's up to you on the comment, I am simply pointing out "someone is wrong on the internet!"
13:35 run4flat very interesting
13:35 run4flat hahaha
13:35 run4flat yeah, I sufferred the same problem last night
13:35 run4flat but was silly enough to respond to it
13:35 run4flat In that case, it was Yuki's comment about "PDL's problem is..."
13:36 ribasushi run4flat: why I said "loop to optree" - loops set up scopes, that *also* costs cycles
13:36 run4flat right, that makes sense
13:36 run4flat that's one of the nice things about Perl's lexical scoping. :-)
13:36 run4flat but of course it has its drawbacks
13:36 ribasushi run4flat: I should chat to you more about my rowparser work when I have some time (not now ) - it led me to a lot of unexpected TIL's
13:37 run4flat sure, sounds good
13:37 run4flat You know I'm in Pennsylvania these days, not Chicago, right?
13:37 run4flat so it'll have to be over the interwebs instead of over beer
13:37 run4flat but yeah, some time, in the future, we should chat more. :-)
13:38 ribasushi ahhhh that's why I couldn't find you in #chicago.pm ;)
13:38 ribasushi it's all the same I hope not to have to see chicago.pm any time soon liv as well
13:38 run4flat heh
13:38 run4flat fair 'nuf
13:39 run4flat alright, back to work
13:39 run4flat thanks for pointing out my error
13:39 ribasushi (not that I have a problem with jberger here, just going to the states is what I am allergic to ;)
13:39 run4flat always good to learn the subtle ways in which I might have mis-spoke
13:39 ribasushi run4flat: just a quick taster
13:39 run4flat yep
13:39 run4flat ribasushi++
13:39 run4flat jberger ftw
13:39 run4flat o/
13:39 ribasushi run4flat: it's the thing that takes this: https://github.com/dbsrgits/dbix-class/blob/m​aster/t/resultset/rowparser_internals.t#L211
13:40 * run4flat glances
13:40 ribasushi and generates the source (as in literally on the fly + eval) starting on line 250
13:40 ribasushi dropped a benchmark from ~250 secs to ~16 secs
13:41 run4flat that's a big string eval
13:41 run4flat but that's a huge improvement, too
13:41 run4flat nice
13:41 ribasushi so yeah, perl function calls == fucking expensive
13:47 gtodd joined #pdl
13:48 Mithaldu ribasushi: given what you're doing i expected deeper indentation levels :)
13:49 ribasushi Mithaldu: indentation == scopes == lost ops
13:50 ribasushi if you are doing loop unroll and you end up with scopes - you are doing something wrong
13:50 Mithaldu well
13:50 Mithaldu if i had unrolled my loops back then i'd have generated megabytes of code, i think
13:51 Mithaldu maybe i should try that
13:53 ribasushi Mithaldu: also you are looking at the collapser code (single outer loop, with pigeonhole sorting)
13:53 ribasushi the non-collapsing stuff is single-pass and is indeed rather nested: https://github.com/dbsrgits/dbix-class/blob/​master/t/resultset/rowparser_internals.t#L66
13:53 Mithaldu that means nothing to me :)
13:53 Mithaldu i'm just remembering the time when i created thousand-line functions intentionally because they were faster than anything else
13:54 Mithaldu that looks more like it
13:54 ribasushi I was just commenting on the "I expected more indents"
13:54 Mithaldu i know
13:54 Mithaldu i just mean, i've no idea what pgeonhole sorting is
13:55 ribasushi Mithaldu: think SELECT artist.*, cd.* FROM aritist LEFT JOIN cd ... ORDER BY RANDOM()
13:56 ribasushi you keep a list of "artist's you've seen" so you can stuff each CD where it belongs
13:56 ribasushi or pigeon-hole it
13:57 Mithaldu ah, i see
13:58 ribasushi this is what identifying_columns on line 214 is
13:58 ribasushi and what the @collapse_idx on lines 251/269 is for
13:58 ribasushi Mithaldu: ^^
13:59 ribasushi I should probably make a talk about this @lpw
13:59 ribasushi it's actually not DBIC specific and is abstracted away
13:59 Mithaldu yep, that would be good
13:59 Mithaldu not that i can see it unless it hits youtube, bug still
14:00 ribasushi awwwwww Y U NO COME?!
14:00 Mithaldu no cash/vacation days
14:01 ribasushi :(
14:53 drrho joined #pdl
15:53 drrho joined #pdl
17:58 drrho joined #pdl
18:27 gtodd joined #pdl
19:16 drrho joined #pdl
20:02 drrho joined #pdl
20:37 drrho joined #pdl
21:08 drrho joined #pdl
21:43 drrho joined #pdl
22:27 vicash left #pdl
22:48 drrho joined #pdl

| Channels | #pdl index | Today | | Search | Google Search | Plain-Text | summary