[00:08] *** reportable6 left [01:08] *** greppable6 left [01:08] *** squashable6 left [01:08] *** shareable6 left [01:08] *** evalable6 left [01:08] *** bisectable6 left [01:08] *** notable6 left [01:08] *** bloatable6 left [01:08] *** sourceable6 left [01:08] *** committable6 left [01:08] *** linkable6 left [01:08] *** quotable6 left [01:08] *** releasable6 left [01:08] *** nativecallable6 left [01:08] *** coverable6 left [01:08] *** statisfiable6 left [01:08] *** tellable6 left [01:08] *** benchable6 left [01:08] *** unicodable6 left [01:08] *** coverable6 joined [01:09] *** unicodable6 joined [01:09] *** squashable6 joined [01:09] *** evalable6 joined [01:10] *** notable6 joined [01:11] *** benchable6 joined [01:11] *** sourceable6 joined [01:11] *** nativecallable6 joined [01:59] *** Shane__ joined [02:09] *** quotable6 joined [02:09] *** committable6 joined [02:10] *** releasable6 joined [02:11] *** bisectable6 joined [03:09] *** shareable6 joined [03:09] *** reportable6 joined [03:10] *** bloatable6 joined [03:10] *** tellable6 joined [03:10] *** linkable6 joined [03:56] *** frost left [03:57] *** frost joined [04:10] *** greppable6 joined [05:10] *** committable6 left [05:10] *** quotable6 left [05:10] *** bisectable6 left [05:10] *** releasable6 left [05:10] *** nativecallable6 left [05:10] *** coverable6 left [05:10] *** sourceable6 left [05:10] *** notable6 left [05:10] *** linkable6 left [05:10] *** bloatable6 left [05:10] *** greppable6 left [05:10] *** benchable6 left [05:10] *** squashable6 left [05:10] *** shareable6 left [05:10] *** evalable6 left [05:10] *** tellable6 left [05:10] *** reportable6 left [05:10] *** unicodable6 left [05:11] *** linkable6 joined [05:11] *** unicodable6 joined [05:11] *** notable6 joined [05:11] *** sourceable6 joined [05:12] *** bloatable6 joined [05:12] *** bisectable6 joined [05:12] *** shareable6 joined [05:13] *** benchable6 joined [05:13] *** releasable6 joined [05:13] *** reportable6 joined [05:13] *** nativecallable6 joined [05:13] *** greppable6 joined [05:13] *** tellable6 joined [06:07] *** reportable6 left [06:10] *** reportable6 joined [06:11] *** quotable6 joined [06:12] *** evalable6 joined [06:17] *** frost left [06:21] *** frost joined [06:27] *** frost left [06:49] *** frost joined [06:52] interesting [06:52] Apparently the most performant way to create an object with numerous attributes is just self.bless: attr-a => foo, attr-b => bar [06:54] I have a bunch of classes where .new receives an Array-like bit of data, so I figured all of the hashy stuff involved with named arguments would be a slow down [06:57] passing the array through to BUILD or TWEAK and directly setting the attributes ($!attr-a = @args[0]; $!attr-b = @args[1], …) was about 50% slower than self.bless: attr-a => @args[0], attr-b => @args[1], …) [07:09] *** statisfiable6 joined [07:11] *** abraxxa joined [07:11] *** jjido joined [07:13] *** squashable6 joined [07:17] *** abraxxa left [07:18] *** abraxxa joined [07:32] *** Darkcoal joined [07:51] guifa: we have spent considerable time to optimize object construction, so it's not terribly surprising that it's actually quite fast :) [07:57] *** MasterDuke left [08:12] *** coverable6 joined [08:13] *** committable6 joined [08:16] *** jjido left [08:26] *** abraxxa left [08:28] *** abraxxa joined [09:23] guifa: Yeah, I've found with a couple AoC puzzles. Sometime I'd write a solution using a hash, but when the "keys" are known at compiletime, using a class (where "keys" == method) even an anon class trounced the hash in runtime [09:24] *** Sgeo left [09:26] *** ProperN[out] joined [09:27] *** ProperNoun left [10:27] *** evalable6 left [10:27] *** linkable6 left [10:28] *** evalable6 joined [10:43] guifa/elcaro: for some (2019) benchmark numbers on object construction, see jnthn's Performance Update talk http://jnthn.net/papers/2019-perlcon-performance.pdf [10:43] (esp. slides 90+) [11:04] > Destructuring (and signature unpacks) [11:04] came across this one 😅 [11:28] *** evalable6 left [11:30] *** linkable6 joined [11:30] *** evalable6 joined [12:07] *** abraxxa left [12:08] *** abraxxa joined [12:08] *** abraxxa left [12:08] *** reportable6 left [12:09] *** abraxxa-home joined [12:11] *** frost left [12:45] *** Altai-man joined [12:58] *** tejr left [13:03] *** tejr joined [13:03] *** rypervenche left [13:10] *** reportable6 joined [14:16] nine: yeah, I knew there had been a lot of work on it, but it was just surprising that the direct assignment was so much slower [14:17] the penalty for direct assignment (via TWEAK, BUILD, or similar) is quite substantial [14:19] https://gist.github.com/alabamenhu/86ee3f276b2bf1fc727c572bc4d528be [14:23] ^^ designed to roughly mirror how most of the stuff is made in CLDR and the different classes are things I think I've tried in the past / am using now / considered using. [14:33] I've been using method B, so switching to A whenever I can and G when I can't should get me a pretty massive improvement at runtime [14:41] *** Altai-man left [14:41] *** Altai-man joined [14:50] *** dogbert11 joined [14:51] *** sena_kun_ joined [14:51] *** Kaipi joined [14:51] *** guifa_ joined [14:52] *** vrurg_ joined [14:52] *** sftp_ joined [14:52] *** jrjsmrtn_ joined [14:53] *** greyrat_ joined [14:55] *** djerius left [14:55] *** japhb_ joined [14:55] *** djerius joined [14:56] *** Maylay_ joined [14:57] *** perlmaros_ joined [14:58] *** phogg` joined [14:59] *** Altai-man left [14:59] *** greyrat left [14:59] *** sena_kun left [14:59] *** japhb left [14:59] *** perlmaros left [14:59] *** Kaiepi left [14:59] *** guifa left [14:59] *** dogbert17 left [14:59] *** vrurg left [14:59] *** sftp left [14:59] *** juanfra__ left [14:59] *** jrjsmrtn left [14:59] *** phogg left [14:59] *** gugod left [14:59] *** Maylay left [14:59] *** perlmaros_ is now known as perlmaros [14:59] *** sftp_ is now known as sftp [15:00] *** sena_kun joined [15:02] *** gugod joined [15:14] m: my class A {}; say A.^lookup('BUILD'); say A.^lookup('TWEAK'); say A.^lookup('bless') [15:14] rakudo-moar 1d733cbfa: OUTPUT: «(Mu)␤(Mu)␤bless␤» [15:15] ^^^^ guifa_my understanding is that classes always have a .bless method but *don't* have a BUILD/TWEAK unless you give them one. So using BUILD/TWEAK involves an extra method call (not an alternative one) [15:20] and the pre-assignment options (F & G) are declaring extra variables, so I'm not surprised to see a bit of a slowdown there [15:21] *** Sgeo joined [15:25] (I _am_ a bit surprised to see how slow the dynamic BUILD is. I would have bet on it being slower than BUILD, but a 2.7× difference is a lot [15:25] ) [15:55] codesections yeah, I figured the pre-assignment would be slower, test just shows how much slower [15:58] Optimizations in theory could remove those assignments, I'd think, just didn't know how strong the static optimizer was for that type of stuff [16:01] My understanding is that, right now, there's almost no static optimization – lots of JIT optimization, but not much static. (But I'm hardly an expert) [16:03] In any case, this adds one more thing for me to do while I'm cleaning up code in CLDR [16:04] but with the nice side effect of it probably reducing up the load time for language data by nearly 50% [16:07] it's just … so many files to update hahaha (I think it was gfldex that ran the numbers and it's the largest module by LOC in the ecosystem) [16:21] *** evalable6 left [16:21] *** linkable6 left [16:22] *** linkable6 joined [16:23] *** evalable6 joined [16:39] guifa_: How do all those compare with *not* overriding new, and just instantiating a class with 12 attributes the "old fashioned way"? [16:40] *** japhb_ is now known as japhb [16:42] japhb_ : good question. That doesn't work in my case (the .new for CLDR types passes an index and a blob: no type has knowledge of other types are constructed), but I'll try adding it to the test suit [16:54] japhb_ it's basically the same speed, which kind of makes sense. I think the base .new is just method new (|c) { self.bless: |c }, and in both cases they'll be the multi dispatcher's first attempt [16:55] Nod [17:40] *** jjido joined [17:54] *** phogg` is now known as phogg [17:54] *** phogg left [17:54] *** phogg joined [17:57] *** jjido left [18:08] *** reportable6 left [18:33] *** jjido joined [19:04] *** jjido left [19:10] *** reportable6 joined [19:11] *** sena_kun_ left [20:11] *** evalable6 left [20:11] *** linkable6 left [20:13] *** evalable6 joined [21:01] *** jaguart left [21:01] *** jaguart joined [21:04] *** abraxxa-home left [21:13] *** linkable6 joined [21:25] *** Darkcoal left [22:18] *** MasterDuke joined [23:18] *** committable6 left [23:18] *** evalable6 left [23:18] *** reportable6 left [23:18] *** coverable6 left [23:18] *** squashable6 left [23:18] *** linkable6 left [23:18] *** notable6 left [23:18] *** sourceable6 left [23:18] *** greppable6 left [23:18] *** statisfiable6 left [23:18] *** benchable6 left [23:18] *** nativecallable6 left [23:18] *** shareable6 left [23:18] *** unicodable6 left [23:18] *** quotable6 left [23:18] *** releasable6 left [23:18] *** bisectable6 left [23:18] *** bloatable6 left [23:18] *** tellable6 left [23:19] *** quotable6 joined [23:19] *** benchable6 joined [23:19] *** bisectable6 joined [23:19] *** linkable6 joined [23:20] *** coverable6 joined [23:20] *** notable6 joined [23:20] *** greppable6 joined [23:21] *** reportable6 joined [23:21] *** squashable6 joined [23:21] *** shareable6 joined