<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Have you timed it ?<br>
    <br>
    My gut feeling is the first form is a pointer comparison, so would
    be very quick, whereas the second form is a string comparison so not
    as quick.<br>
    <br>
    Also the first has the advantage of compile time checking.<br>
    <br>
    0.02c<br>
    <br>
    D<br>
    <br>
    On 25/01/11 17:46, Ross Levis wrote:
    <blockquote cite="mid:001a01cbbc4a$d7a6b660$86f42320$@com"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html;
        charset=us-ascii">
      <div>
        <p><span>Just as a matter of curiosity really, anyone know if
            there is any difference in speed for these 2 operations. </span></p>
        <p><span> &nbsp; </span></p>
        <p><span>if abc is TMyObject then </span></p>
        <p><span> &nbsp; </span></p>
        <p><span>and </span></p>
        <p><span> &nbsp; </span></p>
        <p><span>if abc.Classname = &#8216;TMyObject&#8217; then </span></p>
        <p><span> &nbsp; </span></p>
        <p><span>? </span></p>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe</pre>
    </blockquote>
    <br>
  </body>
</html>