08-30-2007 06:44 PM
" I must be doing an extra scalar copy or something."
I think you nailed it!
I think your approach is moving two values were Christian is only moving one.
Ben
08-31-2007 01:56 AM - edited 08-31-2007 01:56 AM
OK, I got an version with the "in place" structure, that is significantly faster. It can even do the 50M(!) I32 element array (200MB for a single copy) in under one second. Even there, the time is still linear with the array size.
Message Edited by altenbach on 08-30-2007 11:58 PM
08-31-2007 02:33 AM
@altenbach wrote:
OK, I got an version with the "in place" structure, that is significantly faster.
Sorry, I have to take that back.
If I replace the "in place" structure wuth a "replace array subset", I get about he same time, maybe even a bit faster. Originally, the "replace" version was slower than the "inplace" version only because I had debugging enabled by accident.
08-31-2007 07:52 AM - edited 08-31-2007 07:52 AM
Message Edited by Marc A on 08-31-2007 08:52 AM
08-31-2007 07:54 AM
Christian,
I really appreciate the public service you are doing with these comparisons between old and new.
My gut feel is that LV was already damn good at minimizing buffer copies prior to the new constructs, PROVIDED you watched your buffer copies.
I suspect there was little room for improvement of the under-lying code but what ws improved was our ability to clearly designate what gets copied when. This by the way will be very helpful because the "old way" relied heavily on "gestures and inuendo (sp?)" to tell LV what to do with buffers.
Ben
08-31-2007 07:57 AM
08-31-2007 08:05 AM
08-31-2007 10:31 AM
@Ben wrote:
I suspect there was little room for improvement of the under-lying code but what ws improved was our ability to clearly designate what gets copied when. This by the way will be very helpful because the "old way" relied heavily on "gestures and inuendo (sp?)" to tell LV what to do with buffers.
Yes, the "in place" structure does not give any advantage here, because the entire code is already "in place" anyway, so there is nothing to improve.
It should probably only provide an advantage in cases where the compiler is too careful and thinks it needs another datacopy, while you know things can be done in place.
08-31-2007 11:40 AM
Euh.. Wouldn't this topic be a very nice nugget???
(or did I miss that somewhere!!)
🙂
08-31-2007 11:45 AM
Good observation Ray.
Why don't you link this thread into Darren's "New Feature Nugget" as an apendix?
Ben