Total Complexity | 9 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class BareNativeBench |
||
9 | { |
||
10 | |||
11 | #[Groups(['arithmetic', 'bare-native'])] |
||
12 | #[Revs(100000)] |
||
13 | public function benchBareNativeBinaryOp() |
||
14 | { |
||
15 | 3 + 2; |
||
16 | } |
||
17 | |||
18 | #[Groups(['arithmetic', 'bare-native'])] |
||
19 | #[Revs(100000)] |
||
20 | public function benchBareNativePow() |
||
21 | { |
||
22 | 3**2; |
||
23 | } |
||
24 | |||
25 | #[Groups(['arithmetic', 'bare-native'])] |
||
26 | #[Revs(100000)] |
||
27 | public function benchBareNativeSqrt() |
||
28 | { |
||
29 | sqrt(3); |
||
30 | } |
||
31 | |||
32 | #[Groups(['trig', 'basic-trig', 'bare-native'])] |
||
33 | #[Revs(100000)] |
||
34 | public function benchBareNativeTrig() |
||
35 | { |
||
36 | sin(1); |
||
37 | } |
||
38 | |||
39 | #[Groups(['trig', 'hyperbolic-trig', 'bare-native'])] |
||
40 | #[Revs(100000)] |
||
41 | public function benchBareNativeTrigH() |
||
42 | { |
||
43 | sinh(1); |
||
44 | } |
||
45 | |||
46 | #[Groups(['trig', 'inverse-trig', 'bare-native'])] |
||
47 | #[Revs(100000)] |
||
48 | public function benchBareNativeInvTrig() |
||
49 | { |
||
50 | asin(1); |
||
51 | } |
||
52 | |||
53 | #[Groups(['logs', 'bare-native'])] |
||
54 | #[Revs(100000)] |
||
55 | public function benchBareNativeLn() |
||
56 | { |
||
57 | log(5); |
||
58 | } |
||
59 | |||
60 | #[Groups(['logs', 'bare-native'])] |
||
61 | #[Revs(100000)] |
||
62 | public function benchBareNativeLog10() |
||
63 | { |
||
64 | log10(5); |
||
65 | } |
||
66 | |||
67 | #[Groups(['logs', 'bare-native'])] |
||
68 | #[Revs(100000)] |
||
69 | public function benchBareNativeExp() |
||
70 | { |
||
71 | exp(5); |
||
72 | } |
||
74 | } |