The Delphi QS-Audit (Performance USEAS) states that using the as-operator is more performant than using TDataTypeToConvertTo(InstanceToConvert). Can anybody approve this and/or tell me why this is the case?

Comments

  1. Stefan - thanks for your feedback. That is what I suspected. I will wait if anybody else enlightens us on this topic and if not I will create a QC entry for the QS-Audit item.

    ReplyDelete
  2. Judging from the description on the "Use 'as' Operator" audit in XE this comes from Delphi.NET. Or I missed the point where they made strings objects :) It also states that using as instead of an is check should be made and not that as should be used instead of a hardcast without is check which is correct.

    ReplyDelete

Post a Comment