12-12-2024 08:19 AM
If using an in place element structure, in some cases, increases memory and VI efficiency, why wouldn't you use it every time? What are the cases in which it does and doesn't increase memory and VI efficiency?
12-12-2024 10:04 AM
In almost all cases, the compiler can optimize the code perfectly for any possible inplaceness, even without that structure.
(I mostly prefer to use the IPE structure to organize certain code constructs.)
12-12-2024 10:17 AM
It is also a blocking function (unless you are using parallel reads)... While you are manipulating the in-place, no one else can get at the data. For example, this could be REAL bad.
12-12-2024 10:27 AM
A DVR is a very special edge case for an IPE. I think the question was more general. There are many more common modes. (My typical use is for array index, un/bundle, and maps)
Of course a DVR needs to protect from concurrent access, but you can configure it to allow parallel read only access.
12-12-2024 10:48 AM
The IPE can result in cleaner code, for example here's code to make a simple histogram. I am sure that under the hood, the binary code is near identical but the IPE avoids diagram clutter and crossed wires.
One of the drawbacks is that all indices need to be wired, complicating things, especially at higher dimensions. That's why the following ideas exists!
Provide-good-defaults-for-unwired-indices-of-the-array-index
Allow-unwired-index-for-Array-Index-Replace-Elements
... and a few newer duplicates...
12-12-2024 10:51 AM
@dakotasmith2 wrote:
If using an in place element structure, in some cases, increases memory and VI efficiency, why wouldn't you use it every time?
It's (a little) more work to create.
It's cleaner in some cases, but a big mess in others. E.g.:
@dakotasmith2 wrote:
What are the cases in which it does and doesn't increase memory and VI efficiency?
Nobody knows exactly... There are optimizations from the Heap to DFIR, and from DFIR to LLVM and from LLVM to binary... It's complex.
12-12-2024 10:57 AM
I sometimes use a naked IPE as single frame flat sequence substitute. It looks nicer, still enforces dataflow, and prevents me from ever adding frames. 😄