Update Kotlin version, refine .gitignore, and optimize tests
Upgraded Kotlin Multiplatform plugin to version 2.1.20 for better compatibility and feature enhancements. Adjusted .gitignore to include `.idea/**` for broader IntelliJ configuration exclusion. Increased test iteration count in `TestCachedString` to improve benchmarking precision.
This commit is contained in:
@@ -25,7 +25,7 @@ class TestCachedString {
|
||||
notCachedPerson.name = "A Longer Longer Longer Longer Longer Test"
|
||||
|
||||
var total = 0
|
||||
repeat(1000000) {
|
||||
repeat(10000000) {
|
||||
total += cachedPerson.name.hashCode()
|
||||
total += notCachedPerson.name.hashCode()
|
||||
}
|
||||
@@ -34,14 +34,14 @@ class TestCachedString {
|
||||
|
||||
var start1 = System.nanoTime()
|
||||
var total1 = 0
|
||||
repeat(1000000) {
|
||||
repeat(10000000) {
|
||||
total1 += cachedPerson.name.hashCode()
|
||||
}
|
||||
val stop1 = System.nanoTime()
|
||||
|
||||
var start2 = System.nanoTime()
|
||||
var total2 = 0
|
||||
repeat(1000000) {
|
||||
repeat(10000000) {
|
||||
total2 += notCachedPerson.name.hashCode()
|
||||
}
|
||||
val stop2 = System.nanoTime()
|
||||
|
||||
Reference in New Issue
Block a user