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 Inline 203
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 Inline 204
Was this article helpful?
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.