!WTvnrBXAWIqKuxyqrR:matrix.org

Julia (lang)

296 Members
General help and discussion about the Julia language34 Servers

Load older messages


SenderMessageTime
5 Jan 2023
@neoabs:matrix.orgneoabsah ok19:37:12
@neoabs:matrix.orgneoabstest2 seems optimal19:37:43
@neoabs:matrix.orgneoabsyour19:37:47
@neoabs:matrix.orgneoabsI think it deserves a thread19:39:34
@neoabs:matrix.orgneoabson discourse19:39:37
@neoabs:matrix.orgneoabsnext level: pmap19:40:03
@wehandre:matrix.physik.uni-augsburg.deAndreas Weh Exactly, this is my issue. It is by far the fastes but doesn't allow for views (SubArrays).
I would prefer, pulling the padding out of the function and just pass the view, better encapsulating the logic (at least for my use case).
19:40:06
@wehandre:matrix.physik.uni-augsburg.deAndreas Weh * Exactly, this is my issue. It is by far the fastest but doesn't allow for views (SubArrays).
I would prefer, pulling the padding out of the function and just pass the view, better encapsulating the logic (at least for my use case).
19:40:25
@wehandre:matrix.physik.uni-augsburg.deAndreas Weh At least for large arrays, test3 seems like an acceptable way to allow views. Like I said, the code is borrowed from an GitHub issue. 19:41:37
@neoabs:matrix.orgneoabsviews are not meant to be used as primary object. They are just to speed up / free up memomory. In your case they are simply obsolete. also 19:42:03
@wehandre:matrix.physik.uni-augsburg.deAndreas WehThis is exactly the point. I want to use views to avoid copies. This however slows down my code, as count is slow. So I had to refactor my whole code base, moving the padding within the function. This obfuscates my code, so I am looking for a way to have fast counting on views. I use views instead of slices which copies exactly because this code is performance critical19:44:21
@wehandre:matrix.physik.uni-augsburg.deAndreas WehBut thanks for the input19:44:49
@neoabs:matrix.orgneoabsif i undestand corretly sum is implemented in such a way that if it is defined over collections etc it does not generate collection and then callculates sum but callculcates sum while generateing subsequent elkements. That means using for ans other iterative generators are optimal19:50:15
@neoabs:matrix.orgneoabs
In reply to @wehandre:matrix.physik.uni-augsburg.de
This is exactly the point. I want to use views to avoid copies. This however slows down my code, as count is slow.
So I had to refactor my whole code base, moving the padding within the function. This obfuscates my code, so I am looking for a way to have fast counting on views. I use views instead of slices which copies exactly because this code is performance critical
but your test 2 does not make any allocations? plus functions are in local scope and after execution insides are deleted
19:52:16
@wehandre:matrix.physik.uni-augsburg.deAndreas WehThere are no allocations, as a generator is used inside the loop.19:53:17
8 Jan 2023
@deharpocrate:matrix.orgHarpocrate joined the room.17:22:16
14 Jan 2023
@bzbz1:matrix.orgbzbzbz1 joined the room.21:57:51
16 Jan 2023
@noahaon:matrix.org@noahaon:matrix.org left the room.22:01:18
18 Jan 2023
@osso33:matrix.orgosaut joined the room.17:09:55
@chepyrka:nitro.chat@chepyrka:nitro.chat removed their profile picture.20:47:40
@chepyrka:nitro.chat@chepyrka:nitro.chat removed their display name chepyrka.20:47:44
@chepyrka:nitro.chat@chepyrka:nitro.chat left the room.20:47:56
20 Jan 2023
@mikwee:matrix.orgmikwee changed their profile picture.19:26:59
21 Jan 2023
@tecosaur:matrix.orgtecosaur joined the room.03:20:30
23 Jan 2023
@kuniberterino:matrix.orgkuniberterino joined the room.21:14:25
26 Jan 2023
@heday:matrix.orgheday joined the room.20:29:28
28 Jan 2023
@playback2396:matrix.orgplayback2396 joined the room.09:55:03
@thinking_is_hard:matrix.org@thinking_is_hard:matrix.org left the room.19:23:49
30 Jan 2023
@dillid:matrix.orgdillid joined the room.15:29:51
31 Jan 2023
@jacob_sykulski:matrix.orgJacob joined the room.18:27:53

There are no newer messages yet.


Back to Room List