|
|
Sponsor |
Re: Type system notes: msg#00267apache.db.derby.devel
>"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.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: About improvement of DERBY-134, TomohitoNakayama |
|---|---|
| Next by Date: | Re: Type system notes, RPost |
| Previous by Thread: | Re: Type system notes, Daniel John Debrunner |
| Next by Thread: | [jira] Created: (DERBY-149) Server hang when invalid string is bound to datetime columns., A B (JIRA) |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|