This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark | (unscaledValue) | Score | Error | Units | |
---|---|---|---|---|---|
value_of | 0 | 0.885 | 0.021 | ns/op | |
ctor_having_big_integer | 0 | 4.141 | 2.112 | ns/op | |
ctor_creating_big_integer_from_long | 0 | 4.010 | 0.850 | ns/op | |
ctor_creating_big_integer_from_bytes | 0 | 11.274 | 1.482 | ns/op | |
ctor_having_string | 0 | 14.536 | 6.909 | ns/op | |
value_of | 1 | 4.080 | 2.500 | ns/op | |
ctor_having_big_integer | 1 | 4.239 | 0.920 | ns/op | |
ctor_creating_big_integer_from_long | 1 | 4.586 | 0.925 | ns/op | |
ctor_creating_big_integer_from_bytes | 1 | 12.411 | 7.313 | ns/op |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BigDecimal’s unscaled value range | baseline (noop) | classic ser/deser | optimized ser/deser | |
---|---|---|---|---|
0 to 999 999 | 8 ns/op | 40 ns/op | 14 ns/op | |
2000000 to 2999999 | 8 ns/op | 39 ns/op | 13 ns/op | |
10 000 000 to 10 999 999 | 8 ns/op | 41 ns/op | 13 ns/op | |
1 million below Long.MAX_VALUE | 8 ns/op | 55 ns/op | 19 ns/op | |
1 million above Long.MAX_VALUE | 8 ns/op | 51 ns/op | 53 ns/op |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.hazelcast.config.Config; | |
import com.hazelcast.config.PredicateConfig; | |
import com.hazelcast.config.QueryCacheConfig; | |
import com.hazelcast.core.Hazelcast; | |
import com.hazelcast.core.HazelcastInstance; | |
import com.hazelcast.core.HazelcastInstanceAware; | |
import com.hazelcast.core.IMap; | |
import com.hazelcast.core.TransactionalMap; | |
import com.hazelcast.map.EntryBackupProcessor; | |
import com.hazelcast.map.EntryProcessor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Plain old implementation, no good - all data gathered in memory in List object. | |
*/ | |
public List<Parent> loadData() throws Exception { | |
String sql = "select parent.id, child.value " | |
+= "from parent join child on (child.parent_id = parent.id) " | |
+= "order by parent.id"; | |
ResultSet rs = connection.createStatement().executeQuery(sql); | |
List<Parent> parents = new ArrayList<>(); |