IRC logs for #openttd on OFTC at 2024-11-09
            
01:59:04 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
02:27:46 *** Wormnest has joined #openttd
02:36:42 *** ian01223 has quit IRC (Quit: User went offline on Discord a while ago)
03:22:10 *** Wormnest has quit IRC (Quit: Leaving)
03:25:18 *** D-HUND has joined #openttd
03:28:53 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:35:25 *** D-HUND is now known as debdog
04:45:06 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/5e4f8db7d602a04449198a4a69a43dadb94c6c2e
04:45:07 <DorpsGek> - Update: Translations from eints (by translators)
05:17:08 *** keikoz has joined #openttd
06:43:33 *** keikoz has quit IRC ()
07:20:45 *** keikoz has joined #openttd
07:47:01 <andythenorth> hmm is 24GB RAM enough?
08:04:27 *** HerzogDeXtEr has joined #openttd
08:17:58 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
08:26:31 <peter1138> No
08:30:42 <andythenorth> what is enough?
08:30:54 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1304724888430575686/image.png?ex=67306f3e&is=672f1dbe&hm=fef8709d86aff7b1743bb09bea87f709e858be3ff582ef84e4e2a3827fa0d05f&
08:30:54 <andythenorth> currently
08:30:59 <peter1138> More
08:31:17 <andythenorth> but I use Firefox and Chrome, and really they'd like about 48 GB each I think
08:33:32 *** reldred has joined #openttd
08:33:32 <reldred> home desktop and my little gpd winmax2 both have 32gb of ram
08:34:11 <reldred> I still think 8-16gb is sufficient for anything that isn't vidya james or like, high end workflows
08:34:26 <reldred> photography, video, 3d shit, blah blah
08:34:51 <andythenorth> the MBP I want to buy has 24GB
08:34:58 <andythenorth> and the Apple tax on 48GB is high
08:35:22 <andythenorth> I've had 16GB forever, and don't feel the need to flex ๐Ÿ˜›
08:38:01 <andythenorth> I can usually recover RAM by closing newgrf wiki tabs in chrome
08:38:11 <andythenorth> the wiki eats insane amounts of memory
08:40:06 <andythenorth> 300 MB for a page
08:40:39 <andythenorth> "it's just static text"
08:40:43 <andythenorth> "running banner ads"
08:41:08 <andythenorth> Discord web client is only 450 MB and has a full application running in the DOM and lots of related large images etc
08:43:49 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1304728139569692703/image.png?ex=67307245&is=672f20c5&hm=9ca409811635eea7f8bcf8e6506cbb6497d27905161f09b0dd4a143e30177aec&
08:43:49 <andythenorth> I've turned this up, maybe it will help ๐Ÿ˜›
08:49:43 <LordAro> andythenorth: that feels like something is broken somewhere
08:50:50 <andythenorth> I think there's just a 300 MB overhead to a chrome process on macOS
08:51:08 <LordAro> that doesn't change anything :p
08:51:24 <andythenorth> "this is modern browsers"
08:53:22 <reldred> Honestly, as much as it's a meme, I used edge for work shit back when I ran a mac at work. Even with several hundred tabs it kept things very much stable and under control on an old 2016 mbp with 16gb of ram.
08:53:41 <reldred> also helped mentally segment
08:53:47 <reldred> work in edge, play in firefox
08:53:55 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1304730680256893028/image.png?ex=673074a2&is=672f2322&hm=746327113e05cd1f9ef0d0acace7e701b4cdd90ff45511ee3e99376fc9d7305d&
08:53:55 <andythenorth> generally I am at peace with Apple price vs. utility. But I'm not paying Tim Apple this much for RAM
08:54:06 <andythenorth> just to have banner ads running for Shein in the wiki
08:54:19 <reldred> consider, ad blockers
08:54:21 <LordAro> reldred: edge > chrome
08:54:23 <LordAro> fite me
08:54:40 <reldred> LordAro: but why would i, I agree
08:54:54 <LordAro> reldred: but yeah, i also do the same, except reversed - FF for work stuff, edge for everything else :)
08:55:02 <andythenorth> reldred: yeah I have browser splits
08:55:09 <andythenorth> one for work, one for personal, one for web dev
08:55:15 <reldred> i just find edge tends to behave with m365 better
08:55:53 <reldred> I do the same at home for when I'm wfh, edge just behaves with stupid ass m365 stank ass servicves
08:56:12 <reldred> and all my bookmarks are in firefox so eh I tend to use that for personal
08:56:12 <LordAro> mm, makes sense
08:56:19 <andythenorth> how much is 24GB of non-soldered RAM? Like ยฃ50 or something?
08:58:02 <andythenorth> hmm not just non-soldered, the problem is that it's integrated with the CPU/GPU
09:00:41 *** nielsm has joined #openttd
09:04:56 * andythenorth me reading about package-on-package architectures
09:09:48 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1304734680398168104/image.png?ex=6730785c&is=672f26dc&hm=6ed844f877e4f4630e88bb0cea2262e63e983af9f3bd10a9bb0a49d5a9306c64&
09:09:48 <andythenorth> "now I feel seen"
09:10:02 <andythenorth> (the last comment)
10:02:40 *** Wolf01 has joined #openttd
10:13:33 <merni> Apple users use chrome? ๐Ÿ˜†
10:28:28 <xarick> if I const variables, will the compiler optimize that for speed or it just doesn't matter
10:35:30 <andythenorth> merni: Most used browser no?
10:35:46 <merni> On Mac in particular?
10:35:49 <merni> Idk
10:37:12 <LordAro> xarick: generally speaking, probably not
10:37:12 <merni> a quick google says safari has about a 9% market share for desktop browsers which instinctually lines up with what I think the market share of macs would be
10:37:29 <LordAro> it matters for function parameters, but the compiler is generally pretty good at knowing whether a variable is const or not
10:42:53 <xarick> I see
10:43:25 <xarick> `static const std::tuple<const Slope, const int> GetTileSlopeGivenHeight(const int hnorth, const int hwest, const int heast, const int hsouth)`
10:43:25 <xarick> testing dumb stuff like this
10:43:45 <xarick> oh, build failed ๐Ÿ™‚
10:43:58 <LordAro> it also doesn't normally help with basic integer types
10:44:17 <LordAro> it can be more useful to you as the programmer though
11:02:41 <xarick> i managed quite something
11:02:54 <xarick> but probably not because of consts
11:03:32 <xarick> GetTileZ and GetTileMaxZ really benefit from 3 std::min/max calls instead of one
11:03:40 <xarick> i'm gonna pr
11:04:39 <xarick> saved 2 seconds on river gen with that
11:10:21 <LordAro> 2 seconds out of how many?
11:10:39 <xarick> 10
11:10:57 <xarick> it's now 8 on a msvc compiler
11:10:58 <LordAro> well, 20% isn't bad actually
11:12:07 <exceptik> but is it sable? ๐Ÿค”
11:13:07 <xarick> gonna test with real master rivers
11:13:12 <xarick> not my implementation
11:13:15 <xarick> just to confirm
11:13:37 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #13067: Codechange: 3 steps of std::min/max with 2 elements are faster than 1 single step with 4 https://github.com/OpenTTD/OpenTTD/pull/13067
11:14:46 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #13067: Codechange: 3 steps of std::min/max with 2 elements are faster than 1 single step with 4 https://github.com/OpenTTD/OpenTTD/pull/13067
11:23:58 <xarick> > [2024-11-09 11:18:52] dbg: [misc:0] [CreateRivers] 16071917 us [avg: 16071917.0 us]
11:23:58 <xarick> > [2024-11-09 11:19:22] dbg: [misc:0] [CreateRivers] 15870105 us [avg: 15870105.0 us]
11:23:58 <xarick> > [2024-11-09 11:19:52] dbg: [misc:0] [CreateRivers] 15815144 us [avg: 15815144.0 us]
11:23:58 <xarick> > [2024-11-09 11:20:26] dbg: [misc:0] [CreateRivers] 15755436 us [avg: 15755436.0 us]
11:23:58 <xarick> After
11:24:45 <LordAro> i think you can probably guess what i'm going to say
11:24:49 <exceptik> why is your PR touching non-related stuff ๐Ÿค”
11:25:58 <LordAro> exceptik: seems pretty well related to me
11:26:36 <LordAro> xarick: any PR claiming to increase performance should contain evidence in the PR
11:27:36 <exceptik> LordAro: im probably looking in the wrong place, it showed other changes like adding preprocessor flags and such ๐Ÿซ 
11:27:56 <LordAro> i'm not seeing any of that
11:28:13 <LordAro> there was a force push that did "something" :)
11:28:25 <xarick> > [2024-11-09 11:25:37] dbg: [misc:0] [CreateRivers] 18200296 us [avg: 18200296.0 us]
11:28:25 <xarick> > [2024-11-09 11:26:09] dbg: [misc:0] [CreateRivers] 17681057 us [avg: 17681057.0 us]
11:28:25 <xarick> > [2024-11-09 11:26:40] dbg: [misc:0] [CreateRivers] 17594394 us [avg: 17594394.0 us]
11:28:25 <xarick> > [2024-11-09 11:27:11] dbg: [misc:0] [CreateRivers] 17465302 us [avg: 17465302.0 us]
11:28:25 <xarick> Before
11:28:33 <exceptik> just the compare burron, don't mind me
11:28:41 <xarick> ah, that was a rebase
11:32:50 <andythenorth> merni: I don't know any mac users who use safari by choice; iOS is different
11:34:29 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #13067: Codechange: 3 steps of std::min/max with 2 elements are faster than 1 single step with 4 https://github.com/OpenTTD/OpenTTD/pull/13067#issuecomment-2466182003
11:36:06 <LordAro> Given how much those functions are used, I daresay there may be other impacts too
11:37:17 <merni> andythenorth: Wow really
11:37:27 <merni> I don't know more than one or two mac users anyway lol
11:37:36 <merni> Where are those 9% coming from then
11:37:45 <reldred> Yeah same, almost all the customers I have that run macs almost exclusively use Chrome
11:41:46 <andythenorth> I am glad the internet has jokes still https://downloadmoreram.com/
11:42:35 <andythenorth> pff anyway, I don't need 48GB?
11:55:30 <DorpsGek> [OpenTTD/team] glx22 commented on issue #598: [ru_RU] Translator access request https://github.com/OpenTTD/team/issues/598
11:58:06 <_jgr_> SamuXarickviaGitHub: To check, you measured this on MSVC, using release builds?
11:58:34 <xarick> yes
11:59:44 <xarick> "E:\OpenTTD Visual Studio\SamuXarick\OpenTTD\out\install\x64-Release\openttd.exe" -d -g -G 1
12:13:15 <xarick> strange, on linux there's no improvements ๐Ÿ˜ฎ
12:16:10 <_jgr_> Doing a release builds with gcc here, your PR makes the function longer and with more branches
12:17:37 <_jgr_> It seems it needs to spill to the stack, and can't just do the obvious code with cmov that in can with the original code
12:18:10 <_jgr_> Not that this makes a huge difference in the big scheme of things
12:18:33 <xarick> there was the original method I didn't test
12:18:56 <xarick> if you check the blame to previously std::
12:19:02 <_jgr_> MIght be worth taking a look at the disassembly to see what MSVC is actually doing
12:20:49 <xarick> https://github.com/OpenTTD/OpenTTD/commit/9b800a96ed32720ff60b74e498a0e0a6351004f9
12:21:44 <xarick> gonna try it pre-LordAro
12:33:14 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304785874420236358/image.png?ex=6730a80a&is=672f568a&hm=68810f05902509eb80cdcfcf333c4cc5c229f5f52427f557d6c05cfb3a67a36a&
12:33:14 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304785874675826761/image.png?ex=6730a80a&is=672f568a&hm=ca8897a3b4f9cc7a3d1490b71fd7754ff5eac1915d8d0832aede7d9818f1d725&
12:33:14 <xarick> > [2024-11-09 12:30:09] dbg: [misc:0] [CreateRivers] 16253842 us [avg: 16253842.0 us]
12:33:14 <xarick> > [2024-11-09 12:30:41] dbg: [misc:0] [CreateRivers] 16205867 us [avg: 16205867.0 us]
12:33:14 <xarick> > [2024-11-09 12:31:09] dbg: [misc:0] [CreateRivers] 15893373 us [avg: 15893373.0 us]
12:33:16 <xarick> > [2024-11-09 12:31:39] dbg: [misc:0] [CreateRivers] 16209667 us [avg: 16209667.0 us]
12:33:16 <xarick> slower
12:33:55 <xarick> maybe slower, perhaps similar
12:34:03 <xarick> on msvc
12:35:37 <exceptik> are you saying that stl variant is slower? than whatever was before?
12:35:58 <DorpsGek> [OpenTTD/OpenTTD] JGRennison commented on pull request #13067: Codechange: 3 steps of std::min/max with 2 elements are faster than 1 single step with 4 https://github.com/OpenTTD/OpenTTD/pull/13067#issuecomment-2466198516
12:57:42 <kuhnovic> One argument against doing all of this that even though it is slower now, it might get perform better in future versions of MSVC. Compiler development focuses heavily on making anything STL-related highly performant, for the simple reason that it's very likely that the user of that compiler will also be using STL.
13:09:15 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304794938239614988/image.png?ex=6730b07b&is=672f5efb&hm=371392f321f2c1dc74223fd0b8a216e70910d29f4596f6632e459c92e6354efb&
13:09:15 <xarick> exceptik: I was comparing to this style of code
13:09:57 <xarick> which is in vein with what it was there before stl variants
13:16:06 <xarick> the function returns the value as int
13:16:11 <xarick> but the heights are uint
13:16:18 <xarick> maybe there's something there
13:16:22 <xarick> converting back and forth
13:16:29 <_glx_> int and uint are not converted
13:16:44 <xarick> oh ๐Ÿ˜ฎ
13:16:48 <xarick> i dunno then
13:19:08 <xarick> Tile::height() is uint8_t, TileHeight(Tile t) returns uint, GetTileZ returns int
13:19:34 <xarick> and std::min previously was casting everything to int
13:19:42 <xarick> or std::max, not sure, one of them
13:19:49 <_glx_> usually doesn't matter
13:20:11 <xarick> there's also TileIndex to Tile
13:26:26 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic dismissed a review for pull request #12992: Codechange: Simplified YAPF ship region node https://github.com/OpenTTD/OpenTTD/pull/12992#pullrequestreview-2419189834
13:26:29 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic updated pull request #12992: Codechange: Simplified YAPF ship region node https://github.com/OpenTTD/OpenTTD/pull/12992
13:29:10 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic updated pull request #12992: Codechange: Simplified YAPF ship region node https://github.com/OpenTTD/OpenTTD/pull/12992
13:33:44 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic updated pull request #12992: Codechange: Simplified YAPF ship region node https://github.com/OpenTTD/OpenTTD/pull/12992
13:34:41 <kuhnovic> How a zero width space ended up in my commit message is beyond me...
13:39:35 <xarick> planting trees
13:39:40 <xarick> uses GetTileZ
13:39:48 <xarick> during world gen, maybe I can use that to test too
13:44:12 <xarick> LT_ARCTIC
13:46:51 <xarick> oh, arctic industries too
13:49:48 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13067: Codechange: 3 steps of std::min/max with 2 elements are faster than 1 single step with 4 https://github.com/OpenTTD/OpenTTD/pull/13067#issuecomment-2466223713
13:54:12 <_jgr_> `std::_Min_vectorized`
13:55:12 <_jgr_> That's doesn't sound very helpful for what is needed here
14:08:22 <_glx_> _EXPORT_STD template <class _Ty, class _Pr>
14:08:22 <_glx_> _NODISCARD constexpr _Ty(min)(initializer_list<_Ty> _Ilist, _Pr _Pred) {
14:08:22 <_glx_> // return leftmost/smallest
14:08:22 <_glx_> _STL_ASSERT(
14:08:22 <_glx_> _Ilist.size() != 0, "An initializer_list passed to std::min must not be empty. (N4971 [alg.min.max]/5)");
14:08:23 <_glx_> #if _USE_STD_VECTOR_ALGORITHMS
14:08:23 <_glx_> if constexpr (_Is_min_max_optimization_safe<const _Ty*, _Pr>) {
14:08:25 <_glx_> if (!_Is_constant_evaluated()) {
14:08:25 <_glx_> return static_cast<_Ty>(_STD _Min_vectorized(_Ilist.begin(), _Ilist.end()));
14:08:27 <_glx_> }
14:08:27 <_glx_> }
14:08:29 <_glx_> #endif // _USE_STD_VECTOR_ALGORITHMS
14:08:29 <_glx_> const _Ty* _Res = _STD _Min_element_unchecked(_Ilist.begin(), _Ilist.end(), _STD _Pass_fn(_Pred));
14:08:31 <_glx_> return *_Res;
14:08:31 <_glx_> }
14:09:47 <xarick> i can't read this kind of code ๐Ÿ˜ฎ
14:10:00 <_jgr_> Looks like it writes the 4 values to a stack array and presumably eventually ends up loading then into an xmm register
14:13:35 <exceptik> what is `_Min_vectorized` doing underneath?
14:14:03 <_glx_> template <class _Ty>
14:14:03 <_glx_> auto _Min_vectorized(_Ty* const _First, _Ty* const _Last) noexcept {
14:14:03 <_glx_> constexpr bool _Signed = is_signed_v<_Ty>;
14:14:03 <_glx_> if constexpr (is_pointer_v<_Ty>) {
14:14:03 <_glx_> #ifdef _WIN64
14:14:05 <_glx_> return reinterpret_cast<void*>(::__std_min_8u(_First, _Last));
14:14:05 <_glx_> #else
14:14:07 <_glx_> return reinterpret_cast<void*>(::__std_min_4u(_First, _Last));
14:14:07 <_glx_> #endif
14:14:09 <_glx_> } else if constexpr (is_same_v<remove_const_t<_Ty>, float>) {
14:14:09 <_glx_> return ::__std_min_f(_First, _Last);
14:14:11 <_glx_> } else if constexpr (_Is_any_of_v<remove_const_t<_Ty>, double, long double>) {
14:14:11 <_glx_> return ::__std_min_d(_First, _Last);
14:14:13 <_glx_> } else if constexpr (sizeof(_Ty) == 1) {
14:14:13 <_glx_> if constexpr (_Signed) {
14:14:15 <_glx_> return ::__std_min_1i(_First, _Last);
14:14:15 <_glx_> } else {
14:14:17 <_glx_> return ::__std_min_1u(_First, _Last);
14:14:17 <_glx_> }
14:14:19 <_glx_> } else if constexpr (sizeof(_Ty) == 2) {
14:14:19 <_glx_> if constexpr (_Signed) {
14:14:21 <_glx_> return ::__std_min_2i(_First, _Last);
14:14:21 <_glx_> } else {
14:14:23 <_glx_> return ::__std_min_2u(_First, _Last);
14:14:23 <_glx_> }
14:14:25 <_glx_> } else if constexpr (sizeof(_Ty) == 4) {
14:14:25 <_glx_> if constexpr (_Signed) {
14:14:27 <_glx_> return ::__std_min_4i(_First, _Last);
14:14:27 <_glx_> } else {
14:14:29 <_glx_> return ::__std_min_4u(_First, _Last);
14:14:29 <_glx_> }
14:14:31 <_glx_> } else if constexpr (sizeof(_Ty) == 8) {
14:14:31 <_glx_> if constexpr (_Signed) {
14:14:33 <_glx_> return ::__std_min_8i(_First, _Last);
14:14:33 <_glx_> } else {
14:14:35 <_glx_> return ::__std_min_8u(_First, _Last);
14:14:35 <_glx_> }
14:14:37 <_glx_> } else {
14:14:37 <_glx_> _STL_INTERNAL_STATIC_ASSERT(false); // unexpected size
14:14:39 <_glx_> }
14:14:39 <_glx_> }
14:14:41 <_glx_> vs ```template <class _FwdIt, class _Pr>
14:14:41 <_glx_> constexpr _FwdIt _Min_element_unchecked(_FwdIt _First, _FwdIt _Last, _Pr _Pred) { // find smallest element
14:14:43 <_glx_> #if _USE_STD_VECTOR_ALGORITHMS
14:14:43 <_glx_> if constexpr (_Is_min_max_optimization_safe<_FwdIt, _Pr>) {
14:14:45 <_glx_> if (!_Is_constant_evaluated()) {
14:14:45 <_glx_> const auto _First_ptr = _STD _To_address(_First);
14:14:47 <_glx_> const auto _Result = _STD _Min_element_vectorized(_First_ptr, _STD _To_address(_Last));
14:14:47 <_glx_> if constexpr (is_pointer_v<_FwdIt>) {
14:14:49 <_glx_> return _Result;
14:14:49 <_glx_> } else {
14:14:51 <_glx_> return _First + (_Result - _First_ptr);
14:14:51 <_glx_> }
14:14:53 <_glx_> }
14:14:53 <_glx_> }
14:14:55 <_glx_> #endif // _USE_STD_VECTOR_ALGORITHMS
14:14:55 <_glx_> _FwdIt _Found = _First;
14:14:57 <_glx_> if (_First != _Last) {
14:14:57 <_glx_> while (++_First != _Last) {
14:14:59 <_glx_> if (_DEBUG_LT_PRED(_Pred, *_First, *_Found)) {
14:14:59 <_glx_> _Found = _First;
14:15:01 <_glx_> }
14:15:01 <_glx_> }
14:15:03 <_glx_> }
14:15:03 <_glx_> return _Found;
14:15:05 <_glx_> }
14:16:34 <_glx_> but it looks like it tries to use `_Min_element_vectorized` as much as possible
14:17:48 <exceptik> the last part is more or less what gcc is doing
14:18:50 <exceptik> and i hate the mixture of spaces and tabs :<
14:19:08 <_jgr_> Assuming I've found the right part of the binary, what it is doing to implement that is major overkill for 4 values
14:20:55 <exceptik> so is the vectorized like... paralel?
14:22:06 <_jgr_> It's using 128 bit xmm registers, so you can do 4 comparisons in parallel
14:22:46 <exceptik> oh, nice optimization
14:23:01 <_jgr_> However this is not really useful if you have only one register's worth of values, as you can't do horizontal comparisons
14:24:44 <_jgr_> <https://pastebin.com/1ks1ajy2> seems to be the implementation
14:26:01 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1304814259317768273/message.txt?ex=6730c279&is=672f70f9&hm=97a84b39fc4141d426d3fcc6861f8da946bb52c13adbd207ac7a5684ae1f6188&
14:26:01 <_glx_> yup it's the implementation
14:27:12 <xarick> I need a avx512 cpu?
14:27:38 <exceptik> are you trying to improve performance for everyone or just for a selection of people?
14:28:14 <xarick> seems that openttd will shine on ryzen 9000 series
14:28:43 <_jgr_> I doubt any part of the OpenTTD code would usefully benefit from AVX512 instructions
14:29:44 <kuhnovic> I doubt any of the change made in Xarick's PR have a noticable effect on gameplay
14:31:17 <_jgr_> Still, GetTileZ/GetTileMaxZ are used very frequently, and avoiding the compiler pessimisation here does not seem unreasonable to me
14:35:40 <_glx_> https://gist.github.com/glx22/f99ac7c9b97c0c64e804c0f74e3d5493 <-- a dirty test, result is not better
14:37:36 <_glx_> but I didn't ran it ๐Ÿ™‚
14:40:54 <_glx_> oh actually it might be better as it's using _Min_element_unchecked directly
14:43:03 <_glx_> but maybe not <https://gist.github.com/glx22/255a9c839f3f8f8748e7dca386d71066>
14:43:50 <johnfranklin> https://cdn.discordapp.com/attachments/1008473233844097104/1304818742026305746/IMG_5821.jpg?ex=6730c6a6&is=672f7526&hm=9e35be3ec8b9b47176a94ef0a63bbef1c4e7cfcb855b1b93e09ac315f7e78cfa&
14:43:50 <johnfranklin> I want unbunch featuresโ€ฆ
14:57:37 <andythenorth> johnfranklin: Are you in Woolaton?
14:57:41 <xarick> some measurements, now on arctic <https://gist.github.com/SamuXarick/2650d3a20e45edaaaaca894b37c73e13>
15:55:34 <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic opened pull request #13068: Codechange: Cleaned up and renamed NodeList https://github.com/OpenTTD/OpenTTD/pull/13068
16:21:31 <johnfranklin> andythenorth: south, across A52 of wollaton
16:22:40 <andythenorth> thought so, I didn't look up the bus numbers
16:22:59 <andythenorth> but I know the tree style and that you were near the A52 ๐Ÿ˜›
16:23:26 <johnfranklin> Is the tree style unique to A52?
16:25:12 <andythenorth> can't explain it ๐Ÿ˜›
16:25:18 <andythenorth> just a pattern my brain does
16:25:56 <johnfranklin> Or is Andy an alumni of UoN such that he remembers such things, maybe
16:26:28 <andythenorth> no, but I went to college in Bestwood Park
16:26:57 <andythenorth> had friends somewhere near where you are
16:39:57 <johnfranklin> Hmm
16:56:26 *** Flygon has joined #openttd
17:16:37 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #13067: Codechange: 3 steps of std::min/max with 2 elements are faster than 1 single step with 4 https://github.com/OpenTTD/OpenTTD/pull/13067#issuecomment-2466303104
17:18:52 <xarick> any other methods you'd like me to test
17:21:26 <xarick> took me about 6 * 2 * 3 * 3 minutes
17:32:28 <kuhnovic> You could look at the isolated performance of these implementations using a benchmarking library such a nanobench. Requires a bit of setup though.
17:38:20 <xarick> eh... the arctic test didn't generate that many rivers
17:39:01 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #13067: Codechange: 3 steps of std::min/max with 2 elements are faster than 1 single step with 4 https://github.com/OpenTTD/OpenTTD/pull/13067#issuecomment-2466308989
17:39:40 <_glx_> artic checks altitude to place some industries
17:41:14 <_glx_> but that's not visible in your results, so ignore me
17:42:04 *** Tirili has joined #openttd
17:42:51 <xarick> generating industries was slow indeed
17:43:03 <xarick> maybe i should ... test it?
17:43:37 <xarick> temperate generated industries in an instant by comparison
17:43:38 *** NGC3982 has joined #openttd
17:43:48 <_glx_> no need, if there's improvement for some stuff, industries will be better too
17:48:14 <NGC3982> any new on the atari ip debacle?
17:48:17 <NGC3982> news*
17:49:01 <_jgr_> std::min_element can be expected to still end up in a vectorised path, same as std::min, <https://github.com/microsoft/STL/blob/25dc2b72b6f594326253cf3a05543f7a5750f802/stl/src/vector_algorithms.cpp#L1784>
17:49:56 <xarick> i just realised i wasn't testing with a static TicToc::State
17:50:16 <xarick> only TicToC::State, but it's okay, it was only 1 run every minute
18:16:00 <xarick> oh, only the last stage of planting trees checks GetTileZ
18:26:33 <xarick> _glx_: first set of results https://gist.github.com/SamuXarick/2650d3a20e45edaaaaca894b37c73e13#file-gettilez_gettilemaxz4-cpp
18:38:18 <_glx_> ok so it's worse
18:48:02 <xarick> done
18:48:47 <xarick> linux pretty unaffected
18:49:51 <_jgr_> If it's not vectorised, it ought to be pretty easy for the optimiser to get rid of the intermediary pointer
18:50:27 <xarick> i changed both GetTileZ and GetTileMaxZ
18:50:58 <xarick> I also assumed the opposite of min_element is max_element
19:01:24 <xarick> https://github.com/OpenTTD/OpenTTD/pull/13067#issuecomment-2466303104
19:01:27 <xarick> afk dinner
19:36:52 <xarick> back
19:47:20 <xarick> something I wanted to test for some time... https://github.com/OpenTTD/OpenTTD/blob/master/src/ship_cmd.cpp#L155
19:47:38 <xarick> gonna test for desyncs
19:47:52 <xarick> between windows and linux, if i'm able to join
19:51:21 <_jgr_> Non-deterministic ordering of that container cannot cause desyncs
19:51:55 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #13068: Codechange: Cleaned up and renamed NodeList https://github.com/OpenTTD/OpenTTD/pull/13068#pullrequestreview-2425564099
19:52:52 <_jgr_> It is clear from the code and in any case it is very difficult to prove the absence of desyncs by testing
19:54:39 <xarick> I got 70k ships savegame
19:54:51 <xarick> it's very handy
19:56:24 <xarick> looks like no desyncs
19:56:49 <xarick> seems to be only checking if an item is already in the container
19:56:54 <xarick> no iterating
19:57:02 <xarick> so it's fine ๐Ÿ™‚
19:58:40 <peter1138> kuhnovic: you've got approval from Xarick 9 months after merging, bet you are relieved.
19:59:33 <andythenorth> imagine if we had like...unit tests or smth
20:00:22 <_jgr_> We do...
20:00:57 <andythenorth> imagine if we had a set of big savegames that some people sometimes test perf with ๐Ÿ˜›
20:01:20 <andythenorth> I might make one, and call it "Wentbourne"
20:01:25 <andythenorth> not sure why that name appeals, but it does
20:01:50 <_jgr_> Wentbourne exercises some paths very hard, and others not at all
20:02:14 <_jgr_> It's not terribly representative
20:05:32 <xarick> when I was using it to get a random tile to create a lake during river gen, i noticed it was not picking the same tiles between linux and windows
20:06:12 <_jgr_> Yes, it is an unordered container
20:09:11 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304900619492003850/image.png?ex=673112e7&is=672fc167&hm=2b3aa4042c62e2982f5597c03bb555f3d95952dba99d04c0410db2f6f52ba369&
20:09:11 <xarick> well time to stop the test
20:31:50 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1304906317860966420/image.png?ex=67311836&is=672fc6b6&hm=54f2502aef8445918d264ca48161bc1592aa9259b74dab6ebadf0496c0004a97&
20:31:50 <xarick> more fun stuff to test
20:38:35 <xarick> weird stuff
20:38:58 <xarick> const'ing stuff isn't exactly speeding things up
20:39:09 <xarick> I am disappointed
20:46:17 <johnfranklin> Is ship pathfinder still in a huge development? I thought it was done by 14.0
20:46:55 <peter1138> Everything is still in development.
20:47:04 <johnfranklin> But it seems a huge one
20:47:19 <johnfranklin> while 13.0 -> 14.0 ship pf is also a huge change
21:25:28 <xarick> foundations is a lot of code
21:33:51 <johnfranklin> Should I learn more c++ (and forget the promise the next day)
21:37:24 <johnfranklin> I canโ€™t imagine Grand Central Main Line; i canโ€™t imagine Victoria Shopping Centre and the Nottingham downtown area used to be train stations and tracks
21:38:57 <squirejames> Great Central. (Grand Central is the current TOC on the East Coast)
21:39:20 <squirejames> But ues its pretty mind bending. We had HS2, then we closed it in the 60s :/
21:52:41 <peter1138> <https://www.reddit.com/r/openttd/comments/1gm6dja/cant_seem_to_make_cyclotron_merge_work_what_am_i/> Honestly, I hate what OpenTTDCoop spawned...
21:53:17 <andythenorth> I like it ๐Ÿ™‚
21:53:20 <andythenorth> I'd never build it
21:53:22 <andythenorth> ever
21:55:11 <LordAro> woof
21:58:34 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:05:31 <peter1138> ```terminate called after throwing an instance of 'std::bad_alloc'
22:05:31 <peter1138> what(): std::bad_alloc```
22:05:32 <peter1138> Oh dear.
22:05:58 *** tokai has joined #openttd
22:05:58 *** ChanServ sets mode: +v tokai
22:11:57 <andythenorth> is it a bad_alloc?
22:16:48 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:04:17 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:10:32 <peter1138> Hmm, maybe time for another squash & rebate.
23:10:39 <peter1138> *rebase.
23:10:55 <peter1138> Or, perhaps, sleep.
23:17:27 <xarick> I'm doing meme tests:
23:17:27 <xarick> Temperate:
23:17:27 <xarick> > [2024-11-09 23:14:55] dbg: [misc:0] [GenerateTerrainPerlin] 1012246 us [avg: 1012246.0 us]
23:17:27 <xarick> > [2024-11-09 23:15:04] dbg: [misc:0] [CreateRivers] 8707872 us [avg: 8707872.0 us]
23:17:27 <xarick> > [2024-11-09 23:15:04] dbg: [misc:0] [GenerateClearTile] 91661 us [avg: 91661.0 us]
23:17:28 <xarick> > [2024-11-09 23:15:06] dbg: [misc:0] [GenerateTowns] 1831473 us [avg: 1831473.0 us]
23:17:28 <xarick> > [2024-11-09 23:15:07] dbg: [misc:0] [GenerateIndustries] 1684036 us [avg: 1684036.0 us]
23:17:30 <xarick> > [2024-11-09 23:15:07] dbg: [misc:0] [GenerateObjects] 14494 us [avg: 14494.0 us]
23:17:30 <xarick> > [2024-11-09 23:15:08] dbg: [misc:0] [GenerateTrees, PlaceTreeGroups] 1023057 us [avg: 1023057.0 us]
23:17:32 <xarick> > [2024-11-09 23:15:09] dbg: [misc:0] [GenerateTrees, PlaceTreesRandomly] 224276 us [avg: 224276.0 us]
23:17:32 <xarick> > [2024-11-09 23:15:14] dbg: [misc:0] [_GenerateWorld, RunTileLoop] 5852640 us [avg: 5852640.0 us]
23:17:34 <xarick> Tropic:
23:17:34 <xarick> > [2024-11-09 23:15:45] dbg: [misc:0] [GenerateTerrainPerlin] 919507 us [avg: 919507.0 us]
23:17:36 <xarick> > [2024-11-09 23:15:48] dbg: [misc:0] [CreateDesertOrRainForest] 2996882 us [avg: 2996882.0 us]
23:17:36 <xarick> > [2024-11-09 23:15:53] dbg: [misc:0] [CreateRivers] 4227162 us [avg: 4227162.0 us]
23:17:38 <xarick> > [2024-11-09 23:15:53] dbg: [misc:0] [GenerateClearTile] 66331 us [avg: 66331.0 us]
23:17:38 <xarick> > [2024-11-09 23:15:55] dbg: [misc:0] [GenerateTowns] 2199400 us [avg: 2199400.0 us]
23:17:40 <xarick> > [2024-11-09 23:16:03] dbg: [misc:0] [GenerateIndustries] 7920450 us [avg: 7920450.0 us]
23:17:40 <xarick> > [2024-11-09 23:16:03] dbg: [misc:0] [GenerateObjects] 12628 us [avg: 12628.0 us]
23:17:42 <xarick> > [2024-11-09 23:16:04] dbg: [misc:0] [GenerateTrees, PlaceTreeGroups] 1046381 us [avg: 1046381.0 us]
23:17:42 <xarick> > [2024-11-09 23:16:05] dbg: [misc:0] [GenerateTrees, PlaceTreesRandomly] 1492242 us [avg: 1492242.0 us]
23:17:44 <xarick> > [2024-11-09 23:16:13] dbg: [misc:0] [_GenerateWorld, RunTileLoop] 7647568 us [avg: 7647568.0 us]
23:17:44 <xarick> wow, that was large
23:22:35 <xarick> **Arctic** (No suitable place for Farms):
23:22:35 <xarick> [2024-11-09 23:20:04] dbg: [misc:0] [GenerateTerrainPerlin] 1046847 us [avg: 1046847.0 us]
23:22:35 <xarick> [2024-11-09 23:20:13] dbg: [misc:0] [CreateRivers] 9339527 us [avg: 9339527.0 us]
23:22:35 <xarick> [2024-11-09 23:20:14] dbg: [misc:0] [GenerateClearTile] 74214 us [avg: 74214.0 us]
23:22:35 <xarick> [2024-11-09 23:20:16] dbg: [misc:0] [GenerateTowns] 2127492 us [avg: 2127492.0 us]
23:22:36 <xarick> [2024-11-09 23:21:21] dbg: [misc:0] [GenerateIndustries] 65242449 us [avg: 65242449.0 us]
23:22:36 <xarick> [2024-11-09 23:21:21] dbg: [misc:0] [GenerateObjects] 18807 us [avg: 18807.0 us]
23:22:38 <xarick> [2024-11-09 23:21:22] dbg: [misc:0] [GenerateTrees, PlaceTreeGroups] 830980 us [avg: 830980.0 us]
23:22:38 <xarick> [2024-11-09 23:21:22] dbg: [misc:0] [GenerateTrees, PlaceTreesRandomly] 519905 us [avg: 519905.0 us]
23:22:40 <xarick> [2024-11-09 23:21:30] dbg: [misc:0] [_GenerateWorld, RunTileLoop] 7752633 us [avg: 7752633.0 us]
23:24:18 <xarick> **Toyland:**
23:24:18 <xarick> > [2024-11-09 23:23:08] dbg: [misc:0] [GenerateTerrainPerlin] 998876 us [avg: 998876.0 us]
23:24:18 <xarick> > [2024-11-09 23:23:17] dbg: [misc:0] [CreateRivers] 8520680 us [avg: 8520680.0 us]
23:24:18 <xarick> > [2024-11-09 23:23:17] dbg: [misc:0] [GenerateClearTile] 90374 us [avg: 90374.0 us]
23:24:18 <xarick> > [2024-11-09 23:23:19] dbg: [misc:0] [GenerateTowns] 1776866 us [avg: 1776866.0 us]
23:24:20 <xarick> > [2024-11-09 23:23:20] dbg: [misc:0] [GenerateIndustries] 1513450 us [avg: 1513450.0 us]
23:24:20 <xarick> > [2024-11-09 23:23:20] dbg: [misc:0] [GenerateObjects] 1 us [avg: 1.0 us]
23:24:22 <xarick> > [2024-11-09 23:23:20] dbg: [misc:0] [GenerateTrees, PlaceTreeGroups] 0 us [avg: 0.0 us]
23:24:22 <xarick> > [2024-11-09 23:23:20] dbg: [misc:0] [GenerateTrees, PlaceTreesRandomly] 232577 us [avg: 232577.0 us]
23:24:24 <xarick> > [2024-11-09 23:23:25] dbg: [misc:0] [_GenerateWorld, RunTileLoop] 4800876 us [avg: 4800876.0 us]
23:29:37 <dwfreed> please use pastebins
23:30:02 <dwfreed> my chat window is 39 lines, and all of them are your pastes right now
23:39:14 *** Tirili has quit IRC (Quit: Leaving)
23:48:13 <wensimehrp> irc
23:59:05 *** silent_tempest has quit IRC (Quit: User went offline on Discord a while ago)