Re: Moved from C++ to Delphi
From: Martin Harvey (Demon Account) (martin_at__nospam_pergolesi.demon.co.uk)
Date: 01/06/04
- Next message: Martin Harvey (Demon Account): "Re: TThread and synchronize"
- Previous message: Craig Stuntz [TeamB]: "Re: Encrypting one line"
- In reply to: Robert Marquardt: "Re: Moved from C++ to Delphi"
- Next in thread: Jens Gruschel: "Re: Moved from C++ to Delphi"
- Reply: Jens Gruschel: "Re: Moved from C++ to Delphi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 06 Jan 2004 19:40:17 +0000
On Mon, 05 Jan 2004 09:35:11 +0100, Robert Marquardt
<robert_marquardt@gmx.de> wrote:
>Martin Harvey (Demon Account) wrote:
>
>> On Fri, 26 Dec 2003 09:02:28 -0000, "Joanna Carter \(TeamB\)"
>> <joannac@btinternetXX.com> wrote:
>>
>>
>>>Edit1.Text = ''
>>
>>
>> Some developers prefer Length(Edit1.Text) = 0
>>
>> :-)
>
>which is inefficient.
No it's not! LStrLen does not have to scan the string, it just reads
the length bit.
you've got one procedure call and return, a conditional jump and an
extra dereference in addition to the code in your solution. I don't
call that expensive. It's still unity cost, and if you seriously
reckon that 7 or 8 clock cycles extra is a serious inefficiency when
doing string manipulations, then you need to find something more
useful to do with your life ...
MH.
- Next message: Martin Harvey (Demon Account): "Re: TThread and synchronize"
- Previous message: Craig Stuntz [TeamB]: "Re: Encrypting one line"
- In reply to: Robert Marquardt: "Re: Moved from C++ to Delphi"
- Next in thread: Jens Gruschel: "Re: Moved from C++ to Delphi"
- Reply: Jens Gruschel: "Re: Moved from C++ to Delphi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|