--- Log opened Mon Dec 09 00:00:14 2024 03:58 -!- cmc [~methos@gateway/tor-sasl/cmc] has quit [Ping timeout: 264 seconds] 05:15 -!- jonatack [~jonatack@user/jonatack] has quit [Ping timeout: 260 seconds] 05:18 -!- jonatack [~jonatack@user/jonatack] has joined #bitcoin-rust 05:45 -!- jonatack [~jonatack@user/jonatack] has quit [Ping timeout: 245 seconds] 05:49 -!- jonatack [~jonatack@user/jonatack] has joined #bitcoin-rust 09:06 < Ademan> this is maybe a bit silly/micro-optimizy but surfacing ScriptBuf::reserve() or better yet, Vec::with_capacity() on script::Builder might be nice. My scripts aren't very big, but they're all nearly identical so I can precalc their length and avoid some copies. I just noticed I can probably do this with Builder::from(Vec::with_capacity(...)) though so maybe there's no need to add another 09:06 < Ademan> constructor 09:06 <@andytoshi> no, we should definitely have some sort of with_capacity contsructor 09:07 <@andytoshi> i'm a bit surprised we don't have one 09:07 < Ademan> maybe I missed it? 09:07 <@andytoshi> no, i don't see it 09:07 <@andytoshi> oversight 12:50 -!- laanwj [~laanwj@user/laanwj] has quit [Ping timeout: 248 seconds] 12:51 -!- laanwj [~laanwj@user/laanwj] has joined #bitcoin-rust 13:55 -!- cmc [~methos@gateway/tor-sasl/cmc] has joined #bitcoin-rust 17:16 -!- greypw149 [~greypw@user/greypw] has joined #bitcoin-rust 17:17 -!- greypw14 [~greypw@user/greypw] has quit [Remote host closed the connection] 17:17 -!- greypw149 is now known as greypw14 18:52 -!- jonatack [~jonatack@user/jonatack] has quit [Ping timeout: 252 seconds] 19:04 < Ademan> wow, afaict preallocating the script buffer with Builder::from(Vec::with_capacity(...)) is 9% faster in my use case, pretty unbelievable (as in, I'm not sure I believe it haha) 19:04 < Ademan> I do construct hundreds of thousands of scripts, so maybe it adds up... 19:24 -!- jonatack [~jonatack@user/jonatack] has joined #bitcoin-rust 22:36 -!- jon_atack [~jonatack@user/jonatack] has joined #bitcoin-rust 22:37 -!- jonatack [~jonatack@user/jonatack] has quit [Ping timeout: 244 seconds] 23:47 -!- jon_atack [~jonatack@user/jonatack] has quit [Read error: Connection reset by peer] 23:48 -!- jonatack [~jonatack@user/jonatack] has joined #bitcoin-rust --- Log closed Tue Dec 10 00:00:15 2024