Note 71 (a rather useless one): The IsPrime function is a slow function used to check whether a number is a prime number. I used this function in past editions of Mastering Delphi (up to version 7) because I needed a slow CPU-intensive operation. I know it could be written to perform the same task much faster, but in this case I simply don't need speed, quite the opposite.

Although this is quite useless information outside of the scope of the book, do you know where I can find a very optimized version of a function to check for prime numbers? Could be an interesting comparison...

This blog post is part of my "113 Delphi 2007 Handbook Notes" blogging project, to promote my new Delphi book.