A Comparison of Client/Server Development Tools; Powerbuilder vs. Delphi
By Michael Lant
Sphere Data Systems Inc.
NOTE: The views and information expressed in this document represent those of its author(s) who are solely responsible for
its content. Borland does not make or give any representation or warranty with respect such content.
III. PERFORMANCE
Summary: Delphi offers
performance vastly superior to PowerBuilder. And only Delphi offers
integrated coding, debugging, testing, and deployment of client/server
applications to increase developer productivity and application
stability.
Native code executables
allow users to get at information more quickly and allows for
faster decision making.
Native code executables
are 15-50 times faster than PowerBuilder's interpreted P-Code.
Native code compilers,
unlike PowerBuilder 5.0's two stage "code generators",
deliver faster application development without compromising maintenance
or robustness.
Delphi has the worlds
fastest integrated native code compiler increasing developer
productivity.
A. Native Optimized Code Compilers vs. Interpreted P-Code
Developers commonly use higher
level languages which are either interpreted at run time or compiled
into machine code. Native code compilers run 15-50 time faster
than interpreted P-Code resulting in faster performance for end
users of the application. This affects their ability to interact
with the application and to make timely decisions crucial to the
business.
Delphi applications are directly
compiled to optimized machine code before the application is delivered
to end users. No run time interpretations occurs and no external
files or DLLs are required for runtime interpretation. This decreases
memory requirements and significantly improves performance over
applications created with PowerBuilder.
New to Delphi 2.0 is an improved
optimizing native code compiler that shares common technologies
with the award winning Borland C++ compiler. This technology
yields executables that are 20-25% smaller and 300-400% faster
than Delphi 1.0.
" Delphi's execution
speed is faster than Microsoft Visual C++ and Symantec C++.",
March 18, 1996, PCWeek
Before a PowerBuilder developer
provides an application to users, the application code goes through
a partial translation to pseudo-code or P-Code. At run time, interpretation
occurs before the code is executed. This additional interpretation
has a significant effect on performance.
"Delphi has one of
the better application distribution capabilities in the business,
using a true native compiler. This frees the developer from the
bonds of slower, less efficient p-code interpreters.", Linthicum,
David, The Success and Failure of Application Development Tools,
DBMS, May 1996
PowerBuilder's runtime environment
is comprised of Dynamic Link Libraries (DLLs). These extra DLLs
must be distributed with any PowerBuilder application requiring
additional disk space and memory. The memory is for the DLL's
as well as additional memory for buffering the interpretation
process. On machines with limited memory, further performance
degradation occurs as a result of the operating system having
to swap data and portions of the application out of memory or
onto the hard drive.
When PowerBuilder released
version 4.0, PowerBuilder developers reported that their 4.0 applications
ran 20% to 70% slower than the same applications created with
PowerBuilder 3.0 on machines with 8M of RAM. This problem of
decreased performance is exacerbated by the fact that most Windows
users will have more than one application open at a time. Each
one of these applications must compete for valuable memory leaving
less memory available for the data and code of the PowerBuilder
application and further degrading application performance. Developers
also report that the size of the PowerBuilder application file
has increased from 20% to 70% when building their applications
under 4.0.
Conclusion: Delphi produces
native high speed machine code executables that are 15-50 times
faster than PowerBuilder and, at times, 815 times faster. PowerBuilder's
Interpreted PCode applications run slowly and require disk
space intensive run-time environments that are difficult to maintain.
1. The Advantage of Integrated Native Code Compilers
Delphi always compiles to
optimized native machine code, unlike PowerBuilder 5.0 which forces
you to process code through a p-code toC code generator which
can then be compiled with a separate C code compiler. Although
this sounds like an attractive way of correcting the major performance
deficiencies of PowerBuilder, it has major drawbacks including
efficiency, code generation problems, and debugging to name a
few. PowerBuilder 5.0's two stage code generator approach will
only have minor impact on the slow performance characteristics
of loops and integer math and, will not address the slow speed
of the DataWindow. Delphi applications will run 10-35 times faster
than compiled PB5 code.
Delphi has shown that there's
a more efficient and reliable way to develop applications by always
directly generating optimized native machine code. Because Delphi
always produces optimized native machine code, it offers a number
of advantages over PowerBuilder 5.0's two stage "code generator"
approach. These advantages include:
- Faster turnaround -
- having the world's
fastest native code compiler, Delphi increases productivity and
encourages Rapid Application Development. Unlike two stage "C
code generators", you never have to wait for the code generator
or go through a separate generate / compile / link cycle.
"It'll [PowerBuilder
5.0] take 15-20 minutes to actually compile an [executable program],"
saysBrian McCarty for MDM Advanced Systems/Lockheed Martin, Information
Week, May 6, 1996.
- Easier testing -
- the code you work with in the Delphi development environment
is the same compiled code you will deploy in your production application.
PowerBuilder applications on the other hand require more testing
to make sure that code that works with the interpreter will behave
the same as the code created by the compiler.
- High level debugging -
- since the Delphi
code that you write is compiled directly into optimized machine
code, you debug the code from within the environment. Compiled
PowerBuilder 5.0 applications are first translated from PowerScript
into C which is then compiled into machine code. This additional
step prevents the use of the debugger in the compiled application.
Thus in PowerBuilder you won't know whether a bug was introduced
in the PowerScript or the PowerScirpt to C-Code translation.
The PowerBuilder developer will also have to use separate tools
to debug C code at additional expense.
- Easiest maintenance -
- With Delphi,
you only have to maintain code in a single high-level language,
object Pascal, rather than having to maintain code in both PowerScript
and in low-level C.
- Easier deployment -
- you can distribute your Delphi applications without runtime
interpreter DLLs making it easy to deploy in the field. PowerBuilder
5.0 applications require in excess of 5Mb of run-time DLLs.
Historically P-Code systems
and code generators have proven to be merely stop gap measures.
However, since that time, many developers have been reluctant
to use P-Code systems due to their inherently slower performance.
As seen with very early C++ implementations, the disadvantages
of a slow turnaround time due to the two-stage compile process
and the difficulty of debugging the generated C code, caused most
C++ developers to seek integrated "native code"
C++ compilers instead.
2. Benchmark Results
The following benchmark tests
indicate the performance advantage Delphi 2.0 applications have
over PowerBuilder applications. All benchmark tests were performed
on a Gateway 2000 V66 (66Mhz 486 processor) with 16 megabytes
of memory. The 16 bit benchmarks were performed using on Windows
3.1.
Larger numbers indicate faster performance
|
PowerBuilder 4.0 |
Visual Basic |
Delphi 16 bit |
Delphi 2.0 |
Sieve |
0.22 |
11.95 |
52.77 |
179.37 |
Whetstone |
0.04 |
1.41 |
4.70 |
15.53 |
File write |
0.05 |
0.42 |
0.74 |
2.89 |
File read |
0.05 |
0.33 |
1.75 |
5.28 |
Benchmark tests show that
code compiled with Delphi 2.0 applications can run from approximately
300% to nearly 400% faster than 16 bit Delphi applications. This
means that Delphi continues to expand it's performance advantage
of over 15-50 times faster than P-Code interpreters. For example,
Delphi 2.0 Sieve benchmark results are 15 times faster than VB
and 815 times faster than PowerBuilder. In addition, because
of the new optimizing linker, .EXEs are 20-25% smaller than before
and still require no runtime interpreter DLLs.
Independently, National Software
Testing Labs had this to say about Delphi performance with respect
to other Client/Server development tools including PowerBuilder.
"Delphi is the fastest,
most versatile, and easiest to use of the evaluated products.
It offers performance superiority across the board...",
NSTL, Software Digest, March 1996
Rating |
Product |
Performance |
Versatility |
Ease of Use |
* * * * |
Delphi |
9.6 |
9.2 |
7.3 |
* * |
PowerBuilder |
5.4 |
7.8 |
6.8 |
Additionally, PCWeek Labs
had this to say about Delphi's performance against C++ compilers
let alone interpreted P-code:
"Delphi 2.0's integer
TAK speed is faster than that of Microsoft's Visual C++ and Symantec
Corp.'s C++." March 18, 1996.
3. 32-Bit Compiler Optimizations
Delphi's 32-bit native code
compiler achieves its performance increase by using a number of
new code optimization techniques. In the past, optimizing compilers
often required experimentation with complex compiler directives
to achieve the fastest performance. In addition, they often depended
on performing additional "passes" over the code which
slows down the compiler and discourages rapid application development.
Delphi 2.0 uses many new optimization techniques automatically,
without guesswork.
Delphi's new 32-bit native
code compiler includes a number of automatic optimizations including
register optimizations, call stack overhead elimination, common
sub-expression elimination, loop induction variables which results
in faster performance. All of the optimizations performed in
the 32-bit compiler are guaranteed correct and in no way change
the meaning of the algorithm. The optimizations can also be
disabled for benchmark comparisons. Delphi 2.0 also includes
the capability of generating "Pentium-safe FDIV" code
to guarantee that Delphi applications which use floating point
division run correctly even on the so-called "flawed Pentium"
processors.
When compiling on a machine
with a Pentium processor, Delphi applications may compile at a
rate in excess of 350,000 lines per minute making it the world's
fastest native code compiler. Large Delphi applications can completely
recompile in well under a minute. On the other hand, large PowerBuilder
applications may take several hours to completely recompile.
Conclusion: Delphi has the
worlds fastest compiler, and creates the fastest executables.
High speed native code executables means that end-users will
increase their productivity and make faster decisions. Developers
will experience significant productivity gains which results in
the reduction of back logged applications and increased ability
to meet the changes of the business.
B. Database Performance
Client/Server database performance
is derived from high speed native drivers and a scaleable engine
architecture. Developers should not have to concern themselves,
for example, with the changing volumes of data which out grow
their applications, data caching, cursor management, etc. A flexible
and powerful database architecture will reduce the amount of code
needed to ensure scalability and speed. It will also reduce the
amount of maintenance for a given application.
1. Scaleable Database Engines
Scaleability: As the core engine, the Borland Database Engine provides unparalleled
compatibility and efficiency in accessing data stored in ORACLE,
Sybase, Informix, InterBase, DB2, and MS SQL Server using high
speed SQL Links native drivers; from dBASE and Paradox data formats
using a native engine; or from other formats using the ODBC standard
interface. The Borland Database Engine is designed from the ground
up to be fast for client/ server development and protects your
current investments by accessing data where ever it exists. On
the other hand, PowerBuilder performance cannot effectively scale
from desktop databases through to workgroup and enterprise databases.
This makes it difficult to evolve with the changing demands on
the application.
Cursor Management: The application development tool and database engines, not the
developer, should be responsible for efficiently manipulating
data through cursor management. The default mechanism of Delphi's
Borland Database Engine is to return result sets on an as-needed
basis to the client application. This offers the quickest mechanism
for interacting with large or small quantities of data. PowerBuilder
applications can only function in this way if the developer writes
extensive code and is willing to negate DataWindow features such
as sorting and summarization.
"PowerBuilder offers
an option to retrieve only as many records into a form as are
immediately needed, but the full result set must be retrieved
in order for browsing and searching to work properly. This results
in PowerBuilder taking three times as long as its next slowest
competitor to access the first record. It is also several times
slower than the other products at applying a filter and updating
a record." Software Digest March 1996, NSTL Client-Server
Development Tools
PowerBuilder defaults to downloading
an entire result set and places the onus on the developer to manage
memory, data caching and performance. This requires extensive
coding that requires extraordinary maintenance and defocuses the
developer from meeting the business objectives. Delphi also has
the ability to work with entire result sets but the developer
is not held responsible for maintaining the data.
Data Analysis: Typically, data from the server is processed by compute-intensive
operations, for example sorting, graphing, or analysis by a user-defined
function. Again, the advantages of high speed native code compiled
applications, such as those created with Delphi, are demonstrable
when dealing with large result sets for analysis. Customers such
as Standard & Poors' Platts division, have ported from interpreted
P-Code applications to Delphi native code executables and have
had their data analysis intensive systems execution time reduced
from 16 hours to 1 hour.
Conclusion: Delphi Client/Server
Suite 2.0 offers the only high speed, scaleable database architecture.
Regardless of where your data resides or the volume of your data,
your application can quickly and easily get to it. Developers
do not have to write and maintain a large amount of data access
code, they only concern themselves with the business problem at
hand.
2. Flexible Update Models
Whether you have a large number
of transactions, typically characterized as OLTP (On-line Transaction
Processing) or a small number of transactions on your database
server, only Delphi Client/Server Suite 2.0, has the flexibility
to meet these different application needs. Delphi developers have
a choice of using the new Cached Update for more control, less
network traffic, and less server locking or the existing Navigational
Update transactional model for tighter Client / Server
coordination.
Delphi's implementation of
cached updates is quite different from PowerBuilder's. Delphi
allows Cached Updates on local and remote tables for scaleable
solutions. Cached Updates is implemented with just one line of
code and offer superior flexibility to manage database transactions
and transaction recovery.
Only Delphi Client / Server
Suite 2.0 allows developers to use a navigational model. Navigational
Updates are a mechanism by which each local transaction is sent
individually to a database server within the context of a SQL
Transaction. Navigational Updates complement Cached Updates and
have two key benefits.
- Navigational Updates
- ensure
that the result set of a SQL query on a client is kept in tight
synchronization with the underlying tables on a database server
by making transactions atomic. It maintains the highest level
of integrity between the server and the client.
- Navigational Updates
- with
Optimistic Locking reduces the amount of time a record, table,
index page or record page is in a lock state by maintaining a
copy of the record on the client and updating a user request in
a SQL transaction with a single record change.
Conclusion: Business applications
are varied and require different methodologies to address their
unique problems. Delphi offers the flexibility of both navigational
and OLTP transaction update models to best map to the desired
performance and usability characteristics of all your applications.
PowerBuilder on the other hand does not have the breadth of functionality
to adequately address all your client / server application types.
|
Connect with Us