Quantcast
Channel: Planet Object Pascal
Viewing all articles
Browse latest Browse all 1725

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

In Delphi XE7, Embarcadero introduced a new Parallel Computing Library.

Programmers – human as they are – see this as a silver bullet, thinking using such a library will take away all your performance issues without having to know about solving race conditions.

Boy are they wrong. The library helps you, and makes it easier. Easier in the sens of “less hard”.

So here is my friendly warning:

Parallel programming is hard. Live with it.

This apart from another important warning:

Delphi XE7 is the first version where this library is introduced. So expect bugs.

This isn’t to say you should not use a library for parallel computing (the OmniThreadLibrary has been around for a reason), just that it is hard to get these right, even for library writers. They often get it right better and faster than rolling your own.

Remember Delphi 6 when TMultiReadExclusiveWriteSynchronizer was introduced and how long it took to flesh out the bugs there?

So here is my last warning:

Parallel computing is that hard. So do use a library, and do so with care. Favour established libraries over new ones.

This is in the New Features:

Parallel Computing Library
  • The Parallel Computing library helps you exponentially increases performance making it easier to write multi-threaded applications that take advantage of multi-core CPUs
  • Boost the performance of your existing VCL and FireMonkey applications, with a self-tuning thread pool
  • Include the new System.Threading unit in your apps and you can do the following:
    • Parallel ‘for’ loops
    • Scheduling of tasks
    • Futures
    • Joining of multiple tasks and waiting for all to complete
    • Easy integration for a significant performance boost

–jeroen

via Delphi XE7 | New Features.


Filed under: Delphi, Delphi XE7, Development, Software Development

Viewing all articles
Browse latest Browse all 1725

Trending Articles