Re: Compiler String Efficiency
- From: "dw85745@xxxxxxxxxxxxx" <dw85745@xxxxxxxxxxxxx>
- Date: 15 Sep 2005 21:32:01 -0700
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.
.
- Follow-Ups:
- Re: Compiler String Efficiency
- From: Jonathan Wood
- Re: Compiler String Efficiency
- 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
- Compiler String Efficiency
- Prev by Date: Re: How to get list of associated programs?
- Next by Date: Re: DllRegisterServer and NT security
- Previous by thread: Re: Compiler String Efficiency
- Next by thread: Re: Compiler String Efficiency
- Index(es):
Relevant Pages
|