Home
Services
News

Lavallee Computer Consulting, Inc.

News


JAVA

Recent benchmarking programs with both Java and Visual Basic reveal some interesting results. Over a period of several months I developed a benchmarking application to determine the feasibility of a full blown client server 2 tier application. The application is very heavy in transaction processing, has little interactive processing and has an extensive database ranging well into the millions of records.

The benchmarking program consisted of the following processing. Read 140,000 master records, 1.68 million detail1 records, 1.68 million detail2 records, update 1.68 million detail 1 records, insert 14,000 records into an exception file and perform 125.58 million calculations.

The database was Oracle 8.04 with partitioned tables and indexes spread across multiple disk drives running on dual 330 megahertz pentium processors with 512 meg of memory. My best guess prior to the start of the run was Visual Basic by a landslide. The results were:

  • Visual Basic - 4.3 hours
  • Java - 2.9 hours
Needless to say these results were totally unexpected given all the talk about Java's slow processing speeds. Not totally convinced by these results I decided to run a few more tests.

The benchmark program consisted of two distinct functions--the database access portion which was pure SQL with no stored procedures or packages and the memory processing portion which consisted of loops, if tests, additions, multiplications and divisions.

My first program would test the memory portion of the program. Performing between 7 and 10 million calculations, loops and tests Java screamed past VB at better than 40 to 1. VB took about 35 seconds for the run while Java took less than a second. Loop counters assured me the processing was actually occurring.

A second test was designed to test database access capability. Using an SQL Select, the program read a 140,000 record table from an Oracle database and simply moved through the recordset one record at a time. In this test VB was better than Java by about 3 to 1.

So when it comes to memory work, Java is lightning fast. When it comes to database access and record manipulation VB comes out ahead.

The results of these two tests make it clear why Java beat out VB in the benchmark program. It's true there were literally millions of records read but there was also a tremendous amount of memory processing going on for each record and the edge Java had over VB on memory processing was much greater than the edge VB had over Java in the database access department.

Does that mean you should junk your Visual Basic programs in favor of Java? Probably not. Visual Basic will probably be around for a very long time primarily because of its simplified GUI design capabilities and its hybrid Object Oriented nature. For us procedural programmers, that's a blessing in disguise since it means we can easily continue to write our procedure code inside a Visual Basic program.

Java still needs to mature in both functionality and robustness. With the push going on for Java's adoption as the standard language, however, it's only a matter of time before it becomes the language of choice.

Home Services News

Lavallee Computer Consulting, Inc.
RR 2 Box 168, Jericho, VT 05465, 802-899-3115 Info@lavalleeccs.com



© 1997-2000 Lavallee Computer Consulting, Inc.
Page Design © Practical Web Solutions