Time Nick Message 01:33 paramat ninja! =) 08:31 ANAND Looking to use std::tuple to return two closely related values, but I notice tuple isn't used anywhere else in the code. 08:32 ANAND I hope we don't have any no-tuple guidelines :) 08:33 ANAND Bc I'm not too happy if I have to create a struct just to return two values together. 08:38 p_gimeno std::pair? 08:41 ANAND Nice 08:41 ANAND I'll give it a shot 09:06 ANAND std::pair suits my use-case well 09:07 ANAND Now I'm trying to make an ObjectRef method return two values. Is there any special way to do this, or would simply calling lua_pushnumber and lua_pushboolean suffice? 09:09 ANAND I could just take a look at another API method that returns more than one value, but I can't think of any at the moment. :) 09:21 nerzhul ANAND yeah we don't have explicit tuples (std::map are using tuples anyway ^^) 09:26 ANAND Right, thanks. I'm using std::pair as p_gimeno suggested. Is that ok? 09:52 ANAND Looking at get_eye_offset; the function simply calls push_v3f twice for first and third. 09:52 ANAND Quite simple for a change... :) 13:14 rubenwardy p_gimeno: have you seen this https://github.com/EvidenceBKidscode/ffiopt/blob/master/ffiopt.patch 13:14 rubenwardy and this: https://forum.minetest.net/viewtopic.php?f=9&t=22555 16:13 p_gimeno rubenwardy: YUCK. Integer for a pointer? 16:16 p_gimeno rubenwardy: this was discussed in #6863 and paramat said it was not worth it, because in most Lua mapgens the transfer was a relatively small part of the processing time compared to dealing with the data 16:16 ShadowBot https://github.com/minetest/minetest/issues/6863 -- Add LuaJIT FFI-friendly memory-intensive functions 16:17 rubenwardy I'm not sure about that 16:17 rubenwardy LuaJIT is quite fast 16:31 p_gimeno yeah, in my maze generator (see third post of the thread), transfer time dominated, but that generator has a very small processing time. When there's noise to process in the Lua side, the processing time is almost necessarily bigger than the transfer time, to the point that it typically dominates. 16:32 p_gimeno Someone posted a profiler run of mapgen on IRC recently, let me see if I can find it. 16:35 p_gimeno http://irc.minetest.net/minetest/2019-04-05#i_5524921 16:36 p_gimeno "setting the data back to the VM" takes 90 of 630 ms 16:39 p_gimeno I did some profiling with paramat's riverdev and watershed and found that the speed gain was negligible 16:40 p_gimeno well, maybe not negligible, but hard to measure due to the dominance of the processing time (as opposed to transfer time, which is what the patch addresses) 16:41 p_gimeno I still liked the idea of having the buffers out of Lua memory, for memory and general Lua performance reasons 16:46 p_gimeno wait, does that mod expose FFI for all mods? 16:46 p_gimeno that's crazy