|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
array operatorsI'm looking for a way to increase performance on a few rather simple integer
array operations, such as adding the values of one to another. I know I can do this procedurally, but was wondering if there wasn't some sort of "mass" operation that would be faster, and can be done in one command. Is there? Paul PJ6,
Be aware that the 8086 processor familly and descents have a small set of instructions, this means that your mass operation will still be a lot of processing. Therefore look how values are stored and you are halfway your question. Avoid boxing, avoid fixed arrays. By instance this seems a clever instruction using late binding dim c as integer = 10 dim d as decimal = 10 dim c as double = myadder(b, c) c = myadder(c, a) public function myadder(byval b as object, c as object) as object return b + c end sub However it is not, it cost very much processor cycles Cor Show quoteHide quote "PJ6" <no***@nowhere.net> schreef in bericht news:ujezUPhcGHA.1856@TK2MSFTNGP03.phx.gbl... > I'm looking for a way to increase performance on a few rather simple > integer > array operations, such as adding the values of one to another. I know I > can > do this procedurally, but was wondering if there wasn't some sort of > "mass" > operation that would be faster, and can be done in one command. Is there? > > Paul > > > Very well, but I also know that there are "bitblt" operations that are
(supposedly) insanely fast with large amounts of data, this is what I was after. Some of what I'm doing can be performed with Matrix operations, but I don't really know if that is any faster than a vanilla interative procedure, either. Paul Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:uX$jnUmcGHA.5116@TK2MSFTNGP04.phx.gbl... > PJ6, > > Be aware that the 8086 processor familly and descents have a small set of > instructions, this means that your mass operation will still be a lot of > processing. Therefore look how values are stored and you are halfway your > question. Avoid boxing, avoid fixed arrays. > > By instance this seems a clever instruction using late binding > dim c as integer = 10 > dim d as decimal = 10 > dim c as double = myadder(b, c) > c = myadder(c, a) > > public function myadder(byval b as object, c as object) as object > return b + c > end sub > > However it is not, it cost very much processor cycles > > Cor > > > > "PJ6" <no***@nowhere.net> schreef in bericht > news:ujezUPhcGHA.1856@TK2MSFTNGP03.phx.gbl... >> I'm looking for a way to increase performance on a few rather simple >> integer >> array operations, such as adding the values of one to another. I know I >> can >> do this procedurally, but was wondering if there wasn't some sort of >> "mass" >> operation that would be faster, and can be done in one command. Is there? >> >> Paul >> >> >> > > OK I found a better approach...
Storing and operating on partial derivatives (along the y-axis) of the data reduced the number of required calculations by 1-2 orders of magnitude. I'm sure if I had been a computer science major this would have been the first thing to occur to me... but I guess I'm just glad it came to me at all. Paul Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:uX$jnUmcGHA.5116@TK2MSFTNGP04.phx.gbl... > PJ6, > > Be aware that the 8086 processor familly and descents have a small set of > instructions, this means that your mass operation will still be a lot of > processing. Therefore look how values are stored and you are halfway your > question. Avoid boxing, avoid fixed arrays. > > By instance this seems a clever instruction using late binding > dim c as integer = 10 > dim d as decimal = 10 > dim c as double = myadder(b, c) > c = myadder(c, a) > > public function myadder(byval b as object, c as object) as object > return b + c > end sub > > However it is not, it cost very much processor cycles > > Cor > > > > "PJ6" <no***@nowhere.net> schreef in bericht > news:ujezUPhcGHA.1856@TK2MSFTNGP03.phx.gbl... >> I'm looking for a way to increase performance on a few rather simple >> integer >> array operations, such as adding the values of one to another. I know I >> can >> do this procedurally, but was wondering if there wasn't some sort of >> "mass" >> operation that would be faster, and can be done in one command. Is there? >> >> Paul >> >> >> > >
Count Instances Of String Within String
Large text file import: MVP question Clearing a custom array 'OpenFileDialog crashes for no reason? Declaring a garbage collector SMTP won't send until thread terminates Accessing SQL dataset value from button Removing array entry so cumbersome?? regular expressions Text into HTML |
|||||||||||||||||||||||