home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / PERFORM / PERFBOOK < prev    next >
Text File  |  1993-08-25  |  4KB  |  99 lines

  1.  
  2.             Borland Pascal Performance Optimization
  3.  
  4.                     drs. Robert E. Swart
  5.                        P.O. Box 799
  6.               5702 NP  Helmond, The Netherlands
  7.                     FidoNet: 2:281/256.12
  8.                 Internet: bobs@dragons.nest.nl
  9.  
  10.  
  11. Push Borland Pascal to its limits. This book is about performance
  12. optimizations for programs created with Turbo or Borland Pascal.
  13. Several techniques are described to enhance the speed and reduce
  14. the size of your applications. The book is packed with numerous
  15. examples demonstrating the power and flexibility of Borland
  16. Pascal, and enhancing the performance in many ways. In addition to
  17. strategies for speed and size optimization, this book contains an
  18. in-depth discussion of important topics for developing optimized
  19. applications for Objects, DPMI and Windows. The book and disk
  20. contain several examples of high performance code, tools and
  21. applications written in Borland Pascal. The book will be about 250
  22. pages, while the disk will contain all source code and several
  23. tools.
  24.  
  25.  
  26. There is a difference between Turbo Pascal programs that work, and
  27. Turbo Pascal programs that work fast! The process of performance
  28. optimization for speed is divided into four steps: finding bottle-
  29. necks, using more efficient algorithms & datastructures, using
  30. more efficient language constructs, and finally using BASM code
  31. or InLine macros.
  32.  
  33. Finding bottle-necks in your code can be done using tools like
  34. Turbo Profiler. Three other timing methods are implemented in
  35. Pascal: one using the System Clock, one using the technique of
  36. Reps Timer (timing the number of executions per clock-tick), and
  37. one using the TPTimer unit from Turbo Power. All methods will be
  38. used throughout the rest of the book for performance measurings.
  39.  
  40. A better algorithm or datastructure can really make the
  41. difference. We will examine general and optimized algorithms for
  42. collections (Stack, Queue, List, Binary Tree, AVL-Tree, B-Tree),
  43. searching (Linear, Binary, Mathematical) and sorting (Bubble,
  44. Merge, Quick and non-recursive Quick-sort).
  45.  
  46. Several programs or routines can be speed up simply by using the
  47. most efficient language construct for the specific problem. We
  48. will see examples of SetTexBuf, BlockRead and Streams, Records
  49. and With, Pointers vs. Arrays, Functions vs. Procedures, IEEE
  50. floating points and emulation vs. Reals, and Var vs. Value or
  51. Const parameters.
  52.  
  53. Sometimes we must descend to the lowest level and write BASM code
  54. or InLine macros. The difference between BASM and InLine macros
  55. will be described. We will see examples of fast Strings, Sets,
  56. and several other routines using advanced assembly language
  57. optimization techniques.
  58.  
  59. Size optimization involves code size, data size, stack and
  60. dynamic memory usage, and overall .exe size. Techniques for
  61. optimizations for size rather than for speed are given.
  62.  
  63. We will see why we must avoid DPMI mode-switches to real mode,
  64. and how we can obtain that goal. Furthermore, some special
  65. considerations are given when developing DPMI, 32-bits DPMI or
  66. even Pentium applications.
  67.  
  68. We will see why virtual functions, constructors and destructors
  69. sometimes cost a lot of time, but when used properly can be of
  70. much use and benefit to an application. When developing
  71. multitasking applications for Windows there are several special
  72. techniques in order to gain more speed.
  73.  
  74. Several tools will be discussed, among which are DumpProg (by DJ
  75. Murdoch and Jeroen Pluimers), TPTimer (by TurboPower) and Stack70
  76. (by Wilbert van Leijen). These tools also can be found on the
  77. accompanying disk.
  78.  
  79.  
  80. Reservations are available until December 31, 1993 for a special
  81. early-bird price of hfl. 69,95.
  82. After December 31, 1993 book will be sold for hfl. 99,95
  83.  
  84. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  85.  
  86.  []   Yes, I want an early-bird discount for the first edition of
  87.       this book.  Bill me for hfl. 69,95 as soon as the book is
  88.       available (early 1994)!
  89.  
  90. Name:  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  91.  
  92. Address: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  93.  
  94. City:  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  Zip: _ _ _ _
  95.  
  96. Signature: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  97.  
  98. Send early-bird coupon to P.O. Box 799, 5702 NP  Helmond.
  99.