End

The code still works, but the timing you get is certainly suspicious:

57 The complete source code is available in the dh2007_InliningTest project folder. Marco Cantu, Delphi 2009 Handbook

Length 15,188[1300000013] Inline 203[1300000013]

The massive extra 15 seconds are required to convert the rather short Uni-codeString into an AnsiString one hundred million times. All you have to do to fix this code and get back the expected result is to change the declaration of the LengthStdcall function to:

| function LengthStdcall (const s: string): Longint; This takes back the timing to (approximately):

Length 408[1300000013] Inline 204[1300000013]

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment