logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: Type system notes: msg#00267

apache.db.derby.devel

Subject: Re: Type system notes

>"Daniel John Debrunner" wrote:

>I think it's actually fairly easy to test this. Write really simple
>tests using direct creation of SQLIntegers, completely outside of the
>engine. Work on plus, write a simple additon using plus that simulates
>what the engine does, execute one million additions using

>1) references through NumberDataValue
>2) referenecs through NumberDataType
>3+) various modified plus() methods as descibed in the type's package.html.

Initial tests (all tests pass non-null arguments) give these typical
results:

1 Million iterations

Total 'native int' time: [0]
Total NumberDataValue time: [140]
Total SQLInteger time: [47]
Total DataValueDescriptor time: [141]
Total int time: [47]

10 Million iterations

Total 'native int' time: [47]
Total NumberDataValue time: [1281]
Total SQLInteger time: [547]
Total DataValueDescriptor time: [1234]
Total int time: [344]

'native int' is just adding two 'int' values together in java - no method
call involved.
'NumberDataValue' is the existing 'plus' function.
'SQLInteger' calls 'plus1' which defines all parameters and the return as
SQLInteger.
'DataValueDescriptor' calls 'plus2' which defines all parameters and the
return as DataValueDescriptor.
(The NumberDataValue interface extends the DataValueDescriptor
interface)
'int' calls 'plus3' which defines all parameters and the return as int.
Since ints can't be null much of the method was removed.

Not much difference between NumberDataValue and DataValueDescriptor which
are 2-3 times slower than SQLInteger.

SQLInteger has pretty low overhead given that it is an Object and performs
all of the 'null' and overflow checking.

Still to do: tests using methods defined on 'self' per Dan's suggestion.

Attachment: SQLInteger.java
Description: Binary data

Attachment: derbytest.java
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo