Re: working with byte arrays
From: Mark Alexander Bertenshaw (mark.bertenshaw_at_virgin.net)
Date: 11/13/04
- Next message: Rick Rothstein: "Re: problem with my toolbar"
- Previous message: J French: "Re: MVPs??? Any reason to Create a Custom checkbox Control?"
- In reply to: J French: "Re: working with byte arrays"
- Next in thread: J French: "Re: working with byte arrays"
- Reply: J French: "Re: working with byte arrays"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 13 Nov 2004 14:51:08 -0000
J French wrote:
> On Sat, 13 Nov 2004 10:31:29 +0100, "Peter" <-> wrote:
>
>> Thanks, Rick
>> I like this solution because it is simple and easy, Thanks again
>> I haven't make any performance tests yet but I could think that it
>> would be faster than my current solution because the whole
>> comparisson is done inside InstrB(no VB loop is running).
>> Thanks for the hint to check the size of the arrays, in my project
>> all bytearrays start at index 0 therefore I just need to concentrate
>> on Ubound.
>
> One thing you will find is that when compiled (not in the IDE) VB
> Loops on Byte Arrays are /astonishingly/ fast
>
> I found this when comparing timing on my Delphi file sorting DLLs, to
> my amazement using callbacks to VB was pretty much the same speed as
> pure Delphi - and Delphi is often virtually unbeatable, even in ASM as
> it uses an optimizing compiler.
And in addition to what J French said, if you go to Advanced Compile options
and check "Remove Array Bounds check", then array access will be even faster
(you *do* check bounds when necessary in your code, don't you?).
-- Mark Bertenshaw Kingston upon Thames UK
- Next message: Rick Rothstein: "Re: problem with my toolbar"
- Previous message: J French: "Re: MVPs??? Any reason to Create a Custom checkbox Control?"
- In reply to: J French: "Re: working with byte arrays"
- Next in thread: J French: "Re: working with byte arrays"
- Reply: J French: "Re: working with byte arrays"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|