--- Log opened Sun Dec 15 00:00:37 2019 00:33 -!- davterra [~dulyNoded@176.113.74.9] has quit [Ping timeout: 240 seconds] 00:34 -!- davterra [~dulyNoded@176.113.74.9] has joined #rust-bitcoin 01:04 -!- belcher [~belcher@unaffiliated/belcher] has quit [Read error: Connection reset by peer] 01:07 -!- belcher [~belcher@unaffiliated/belcher] has joined #rust-bitcoin 02:46 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Ping timeout: 276 seconds] 03:02 -!- Haley36Crist [~Haley36Cr@ns334669.ip-5-196-64.eu] has quit [Remote host closed the connection] 03:32 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 03:34 -!- Jermey10Schamber [~Jermey10S@ns334669.ip-5-196-64.eu] has joined #rust-bitcoin 04:40 -!- Kiminuo [~mix@157.157.87.222] has joined #rust-bitcoin 04:50 < Kiminuo> Does anyone find this https://www.diffchecker.com/khDaWtBa worth of PR? 04:53 -!- Jermey10Schamber [~Jermey10S@ns334669.ip-5-196-64.eu] has quit [Ping timeout: 245 seconds] 05:08 -!- Kiminuo [~mix@157.157.87.222] has quit [Ping timeout: 240 seconds] 05:08 -!- guest534543 [~mix@213.128.80.60] has joined #rust-bitcoin 05:16 -!- guest534543 [~mix@213.128.80.60] has quit [Quit: Leaving] 05:17 -!- Kiminuo [~mix@213.128.80.60] has joined #rust-bitcoin 05:34 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has quit [Read error: Connection reset by peer] 05:35 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has joined #rust-bitcoin 06:00 -!- Kiminuo [~mix@213.128.80.60] has quit [Ping timeout: 252 seconds] 06:20 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has quit [Quit: My MacBook has gone to sleep. ZZZzzz...] 06:43 -!- davterra [~dulyNoded@176.113.74.9] has quit [Quit: Leaving] 06:43 -!- davterra [~dulyNoded@176.113.74.9] has joined #rust-bitcoin 07:03 -!- andytoshi [~apoelstra@wpsoftware.net] has joined #rust-bitcoin 07:03 -!- andytoshi [~apoelstra@wpsoftware.net] has quit [Changing host] 07:03 -!- andytoshi [~apoelstra@unaffiliated/andytoshi] has joined #rust-bitcoin 07:12 -!- andytoshi [~apoelstra@unaffiliated/andytoshi] has quit [Ping timeout: 250 seconds] 07:31 -!- davterra [~dulyNoded@176.113.74.9] has quit [Ping timeout: 246 seconds] 07:32 -!- davterra [~dulyNoded@176.113.74.9] has joined #rust-bitcoin 08:00 < elichai2> Kiminuo I'd personally prefer to not use a HashSet for this 08:43 -!- Kiminuo [~mix@213.128.80.60] has joined #rust-bitcoin 08:49 < stevenroose> elichai2: what are ways to check for duplicates without a hashset? (or some other form of set) 08:49 < stevenroose> One could sort. 08:53 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has joined #rust-bitcoin 08:53 < Kiminuo> elichai2, Why not? (HashSet is used in Bitcoin Core too.) 08:55 < elichai2> stevenroose: there are some algorithms out there that run in O(n) haven't done it in a while 08:55 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has quit [Read error: Connection reset by peer] 08:56 < elichai2> Kiminuo: ha. you're right. `tx_check.cpp` inserts into a HashSet to check for duplicate inputs. 08:56 < Kiminuo> typical hashset.insert() implementation runs in O(1), so the algorithm would run in O(n) 08:56 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has joined #rust-bitcoin 08:56 < elichai2> I'd personally prefer to not use heap allocation for something like that 08:56 < elichai2> Kiminuo: but it's also O(n) memory 08:57 < Kiminuo> i know 08:57 < Kiminuo> it's a tradeoff 08:58 < Kiminuo> you can sort an array/list but you modify that array and I guess not many people expect that 09:03 < Kiminuo> Also sorting may potentially break "coinbase is first tx" assumption 09:04 < stevenroose> Kiminuo: how is that relevant for duplicates? 09:05 < stevenroose> I guess one would have to manually implement a sorting algorithm that breaks out once it detects a duplicate 09:06 < elichai2> while trying to implement this it seems like it boils down to still needing heap allocation but less (i.e. we don't want to dump the whole input on the heap. just the hash of it. or just the hash modulo the size etc.) 09:06 < elichai2> which is probably micro optimization 09:06 < elichai2> because we do need some mutable list the same size of the input array 09:08 < elichai2> Kiminuo: at the very list add a `let sizes = inputs.size_hint(); let size = sizes.1.unwrap_or(sizes.0); set.reserve(size)` 09:08 < elichai2> to make this a single heap allocation 09:08 < Kiminuo> stevenroose, sorry, got distracted, it's nonsense ofc 09:24 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Ping timeout: 252 seconds] 09:26 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 09:27 -!- davterra [~dulyNoded@176.113.74.9] has quit [Quit: Leaving] 09:39 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has quit [Read error: Connection reset by peer] 09:41 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has joined #rust-bitcoin 09:41 -!- Kiminuo [~mix@213.128.80.60] has quit [Quit: Leaving] 09:46 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has quit [Read error: Connection reset by peer] 09:47 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has joined #rust-bitcoin 09:58 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has quit [Read error: Connection reset by peer] 09:59 -!- orlovsky [~dr-orlovs@91.235.142.210] has joined #rust-bitcoin 10:37 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has joined #rust-bitcoin 10:37 -!- orlovsky [~dr-orlovs@91.235.142.210] has quit [Ping timeout: 245 seconds] 10:59 < dpc> Silly, naive, lurking comment idea - have anyone timed linear search solution? It's O(n^2), but the N is low, and super cache friendly? 11:45 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has quit [Read error: Connection reset by peer] 11:45 -!- dr-orlovsky [~dr-orlovs@37.46.115.6] has joined #rust-bitcoin 11:47 -!- dr-orlovsky [~dr-orlovs@37.46.115.6] has quit [Read error: Connection reset by peer] 11:52 -!- dr-orlovsky [~dr-orlovs@91.235.142.210] has joined #rust-bitcoin 12:10 -!- orlovsky [~dr-orlovs@194.230.155.171] has joined #rust-bitcoin 12:12 -!- dr-orlovsky [~dr-orlovs@91.235.142.210] has quit [Ping timeout: 250 seconds] 15:28 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has joined #rust-bitcoin 15:28 -!- orlovsky [~dr-orlovs@194.230.155.171] has quit [Read error: Connection reset by peer] 18:56 -!- frost_red [~paysonl@115.199.98.216] has joined #rust-bitcoin 18:56 -!- frost_red [~paysonl@115.199.98.216] has quit [Quit: Konversation terminated!] 19:07 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 19:08 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 20:09 -!- Netsplit *.net <-> *.split quits: jkczyz, belcher, warren, fiatjaf, gwillen 22:42 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 260 seconds] --- Log closed Mon Dec 16 00:00:38 2019