java.sql2 and primitive types
douglas.surber at oracle.com
Wed Oct 18 13:09:53 UTC 2017
From what I have read and been told about auto boxing and Hotspot there shouldn’t be any performance benefit. I agree with Lance. If there is a performance benefit we can consider it. In my opinion it is very low on the benefit to weight scale.
> On Oct 18, 2017, at 4:19 AM, Lance Andersen <lance.andersen at oracle.com> wrote:
> Hi Lukas,
>> On Oct 18, 2017, at 4:33 AM, Lukas Eder <lukas.eder at gmail.com> wrote:
>> I haven't seen any reference to primitive types in the suggested API, nor
>> in the JavaOne 2017 CON1491 presentation. Have there been considerations of
>> repeating API methods, e.g. in Result.ResultMap, such as:
>> - byte getByte(String id)
>> - short getShort(String id)
>> - int getInt(String id)
>> - long getLong(String id)
>> - etc.
> We have been trying to move away from specific get/setXXX as the API gets cluttered. I guess it is something that could be revisited if there is a significant performance difference
>> Likewise, ParameterizedOperation could have setByte(), setShort(), etc.
>> While I don't think this optimisation is significant in
>> ParameterizedOperation, it could be worth thinking about in ResultMap, e.g.
>> when someone fetches millions of longs vs millions of Longs.
>> Whether driver implementations profit from this additional API would be
>> entirely up to them.
> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
> Oracle Java Engineering
> 1 Network Drive
> Burlington, MA 01803
> Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
More information about the jdbc-spec-discuss