IRC logs for #openttd on OFTC at 2025-11-28
⏴ go to previous day
00:18:47 *** kuka_lie has quit IRC (Quit: Lost terminal)
02:03:56 *** Tirili has quit IRC (Read error: Connection reset by peer)
03:38:32 *** Wormnest has quit IRC (Quit: Leaving)
03:50:47 *** gnu_jj_ has joined #openttd
03:54:10 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
04:08:37 *** Zathras_4 has joined #openttd
04:12:01 *** Zathras_1 has quit IRC (Ping timeout: 480 seconds)
04:40:50 <DorpsGek> - Update: Translations from eints (by translators)
06:41:18 *** tokai|noir has joined #openttd
06:41:18 *** ChanServ sets mode: +v tokai|noir
06:48:15 *** tokai has quit IRC (Ping timeout: 480 seconds)
08:12:17 *** gelignite has joined #openttd
08:55:19 <peter1138> Hmm, appear to have misplaced all my USB memory sticks.
09:42:21 <xarick> how do i make it default initialize itself to this->values.end() ?
09:54:59 <peter1138> You need to pass the container as a parameter to the constructor.
11:16:03 *** Zathras_4 has quit IRC (Quit: Connection reset by beer!)
12:11:14 <xarick> i just realized how big an iterator is
12:13:31 <xarick> 8 bytes in release, 24 bytes in debug?
12:13:59 <peter1138> Well, one is in release, and one is in debug.
12:15:48 <xarick> if i'ts 8 bytes, that's still acceptable
12:15:54 <xarick> 24 bytes - that is not!
12:19:20 <peter1138> Well, don't use debug builds then :)
12:19:35 <peter1138> Certainly don't benchmark them, but that's a given anyway.
12:26:15 <xarick> so an std::map entry is now...
12:27:45 <xarick> 8 bytes for the key(item) 8 bytes for value, 8 bytes for viter
12:28:23 <peter1138> With std::map there is internal stuff going on that is difficult to measure.
12:29:10 <xarick> gonna turn on the memory debug thingie
12:30:33 <locosage> I'd guess internal stuff takes about sizeof(_Rb_tree_node_base) per element
12:32:11 <xarick> lunch... be back later to check this
13:03:33 *** gelignite is now known as Guest32452
13:03:36 *** gelignite has joined #openttd
13:10:12 *** Guest32452 has quit IRC (Ping timeout: 480 seconds)
13:20:00 <xarick> ins't gitlab github with another name?
13:39:12 <xarick> 30 million items take aproximately 2 GB of memory, but this also includes the this->values container 😐
13:39:22 <xarick> let me try separate it
13:43:38 <xarick> oh, right, it's not 30 million items, my bad
13:43:57 <xarick> in reality, about 18 million are created
13:49:21 <xarick> let me roll back to a commit where i don't have viter
13:55:14 <xarick> viter takes exactly 8 bytes, now I know
13:58:23 <xarick> i expected 16, 8 for key, 8 for value. 48-16 = 32 bytes for red black tree own doings
13:59:13 <peter1138> 13:20 < xarick> ins't gitlab github with another name?
14:05:17 <xarick> let me check safe btree sizes
14:06:07 <LordAro> peter1138: tbf, in the way that xarick probably means it, the answer is mostly yes
14:11:13 <xarick> erm, i dont understand how safe btree works
14:14:13 <xarick> that's not a good number
14:14:32 <xarick> ~21 bytes per element?
14:16:10 <locosage> try reading what b-tree is :p
14:16:58 <xarick> whatever it is, it's efficient!
14:18:25 <rito12_51026> Do rails have NewGRF extra text?
14:33:36 <xarick> mister copilot suggests me to use flat map
14:33:51 <xarick> or at least, experiment with and benchmark
14:36:33 *** Wormnest has joined #openttd
15:03:44 <peter1138> _glx_, what's new? :)
15:04:22 <_glx_> just rebased and fixed LordAro's comments
15:24:29 <LordAro> doesn't sound like me
15:30:36 <peter1138> Something about an early return.
15:30:49 <peter1138> Hmm, can't get this laptop to boot a USB device :/
15:38:39 <peter1138> Ah ha, had to disable SecureBoot.
16:51:16 *** ChanServ sets mode: +v tokai
16:53:40 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
17:07:05 *** tokai has quit IRC (Ping timeout: 480 seconds)
17:12:23 *** ChanServ sets mode: +v tokai
17:26:03 <_zephyris> This wind needs to chill out...
17:36:50 *** Tirili has quit IRC (Quit: Leaving)
17:40:35 *** tokai has quit IRC (Ping timeout: 480 seconds)
17:42:56 *** ChanServ sets mode: +v tokai
18:36:21 <xarick> question. if i do erase at the item at begin, what will be the returned iterator?
18:38:16 <xarick> meh, dumb question it seems
18:40:31 <xarick> handling vector iterators is even more complicated
18:44:12 <andythenorth> Why am I cold? It is not cold weather
18:48:09 *** moll has quit IRC (Ping timeout: 480 seconds)
18:57:07 <xarick> alright, i got a std::vector replacing std::map, let's see what kind of performance it gets
18:57:48 <xarick> not handling the same way as peter's
19:00:20 <xarick> alright, I regret already, it's bad
19:00:50 <xarick> letting it run, be back later to see results... dinner time
19:09:50 *** Zathras_4 has joined #openttd
19:25:44 <xarick> wow... ok i give up, taking too much time
19:34:46 <xarick> it's as slow as peter's
19:34:52 <xarick> i guess vector is busted
19:35:32 <peter1138> You should learn what the different containers do, and what they're for.
19:37:41 <andythenorth> When we have desktop quantum, xarick will find all problems solved
19:37:52 <xarick> 12 seconds for 300k items
19:37:53 <andythenorth> But Horse will still compile slow
19:41:48 <peter1138> The sorted-vector approach is okay when the size of the data is smaller.
19:57:56 *** kuka_lie has joined #openttd
20:03:26 <peter1138> Fairly sure that'll end up worse than a sorted vector :-)
20:16:51 <xarick> 183 seconds for ~300k items
20:30:05 <_glx_> there's a reason ScriptList uses std::set + std::map
20:31:15 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
20:43:08 <rito12_51026> How do I concatenate two initializer_lists? Should I even try to do it?
20:47:07 <Rubidium> std::view::concat or std::ranges::concat I'd reckon
21:04:24 <rito12_51026> Rubidium: Looks great but it's available since C++26 and OpenTTD is on C++20
21:05:26 *** lobster has quit IRC (Read error: Connection reset by peer)
21:05:34 *** lobster has joined #openttd
21:53:25 <mmtunligit> so much for easy win :P
21:54:10 <mmtunligit> man i have been *rotting* this week, hopefully my schedule goes back to normal tomorrow, im tired of waking up and still being tired
21:55:06 *** Zathras_4 has quit IRC (Quit: Connection reset by beer!)
23:06:13 *** Flygon has quit IRC (Remote host closed the connection)
continue to next day ⏵