Re: Compiler String Efficiency
- From: "Jonathan Wood" <jwood@xxxxxxxxxxxxxxxx>
- Date: Fri, 16 Sep 2005 10:12:40 -0600
Again, however VB allocates strings, Space$() would be using the same code.
So it's not worth trying to work around.
I don't believe the 255 thing is an issue with VB although I would love to
see the reference that talked about that.
--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm
<dw85745@xxxxxxxxxxxxx> wrote in message
news:1126845121.461146.85540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I drew this conclusion from looking at several string concatenation
> routines where the speed was significantly increased in VB by
> preallocating memory (Space$) for the string with a buffer whereas by
> concatenating the strings themselves resulted in much slower
> concatenation.
>
> Granted in concatenation the compiler doesn't know the size of the
> resulting string.
>
> This set me to wondering how VB was handling the memory allocation --
> that is, automatically setting aside a set amount of memory (e.g. 255)
> and then reducing OR
> determining the string Len, and then allocating the required amount of
> memory.
>
> If a set amount of memory is being set aside, then the buffer should be
> faster and more efficient.
>
.
- References:
- Compiler String Efficiency
- From: dw85745@xxxxxxxxxxxxx
- Re: Compiler String Efficiency
- From: Jonathan Wood
- Re: Compiler String Efficiency
- From: dw85745@xxxxxxxxxxxxx
- Re: Compiler String Efficiency
- From: Jonathan Wood
- Re: Compiler String Efficiency
- From: dw85745@xxxxxxxxxxxxx
- Compiler String Efficiency
- Prev by Date: Re: I Nominate this NewsGroup
- Next by Date: Re: Forcing a textbox style
- Previous by thread: Re: Compiler String Efficiency
- Next by thread: Re: Compiler String Efficiency
- Index(es):
Relevant Pages
|
Loading