Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 663bf1d

Browse files
committed
ベンチマーク用に5引数の呼び出し対象関数類を追加
1 parent c1fb9c0 commit 663bf1d

File tree

1 file changed

+43
-0
lines changed
  • src/jmh/kotlin/com/mapk/fastkfunction/benchmarktargets

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.mapk.fastkfunction.benchmarktargets
2+
3+
data class Constructor5(
4+
val arg1: Int,
5+
val arg2: Int,
6+
val arg3: Int,
7+
val arg4: Int,
8+
val arg5: Int
9+
) {
10+
fun instanceFun5(arg1: Int, arg2: Int, arg3: Int, arg4: Int, arg5: Int) = Constructor5(
11+
this.arg1 + arg1,
12+
this.arg2 + arg2,
13+
this.arg3 + arg3,
14+
this.arg4 + arg4,
15+
this.arg5 + arg5
16+
)
17+
18+
companion object {
19+
fun companionObjectFun5(
20+
arg1: Int,
21+
arg2: Int,
22+
arg3: Int,
23+
arg4: Int,
24+
arg5: Int
25+
) = Constructor5(arg1, arg2, arg3, arg4, arg5)
26+
}
27+
}
28+
29+
fun topLevelFun5(
30+
arg1: Int,
31+
arg2: Int,
32+
arg3: Int,
33+
arg4: Int,
34+
arg5: Int
35+
) = Constructor5(arg1, arg2, arg3, arg4, arg5)
36+
37+
fun Constructor5.topLevelExtensionFun5(arg1: Int, arg2: Int, arg3: Int, arg4: Int, arg5: Int) = Constructor5(
38+
this.arg1 + arg1,
39+
this.arg2 + arg2,
40+
this.arg3 + arg3,
41+
this.arg4 + arg4,
42+
this.arg5 + arg5
43+
)

0 commit comments

Comments
 (0)