Re: Function speed, which is fast
From: Frank de Groot (franciad_at_online.no)
Date: 11/12/04
- Next message: Frank de Groot: "Re: Function speed, which is fast"
- Previous message: Jud McCranie: "Re: Break a while or goto loop?"
- In reply to:(deleted message) L D Blake: "Re: Function speed, which is fast"
- Next in thread: Jud McCranie: "Re: Function speed, which is fast"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 12 Nov 2004 17:35:14 +0100
"L D Blake" <not@any.adr> wrote in message
news:ipi8p0hdfdkmjqu842q13gbo4si5pf4bha@4ax.com...
> Which is going to take longer...
>
> Allocate string,
> Add 1 character,
> Reallocate string,
> done: copy to new string
> or
>
> write 1 character to static memory
> increment pointer
> cast as string (no conversion, it reads it in place)
>
> Really... string buffers are just so cool.
You haven't understood my example.
Your method is slower, less easy to read, more effort to type, and more
non-standard than my method.
I allocate length once for the entire string, then add the characters, then
set the length to the correct size.
- Next message: Frank de Groot: "Re: Function speed, which is fast"
- Previous message: Jud McCranie: "Re: Break a while or goto loop?"
- In reply to:(deleted message) L D Blake: "Re: Function speed, which is fast"
- Next in thread: Jud McCranie: "Re: Function speed, which is fast"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|