Skip to content

Commit cedf4d0

Browse files
committed
Better benchmarks
1 parent 7a5d094 commit cedf4d0

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed

bench/EnumBench.php

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ public function benchDetectConstants()
115115
Enum66::getConstants();
116116
}
117117

118+
public function benchGetConstants()
119+
{
120+
Enum66::getConstants();
121+
}
122+
118123
public function benchGetValues()
119124
{
120125
Enum66::getValues();
@@ -142,14 +147,6 @@ public function benchByValue()
142147
}
143148
}
144149

145-
public function benchByValueAndInitialize()
146-
{
147-
foreach ($this->values as $value) {
148-
$this->destructEnumerations();
149-
Enum66::byValue($value);
150-
}
151-
}
152-
153150
public function benchByValueAndInstantiate()
154151
{
155152
$this->destructEnumerationInstances();
@@ -165,14 +162,6 @@ public function benchByName()
165162
}
166163
}
167164

168-
public function benchByNameAndInitialize()
169-
{
170-
foreach ($this->names as $name) {
171-
$this->destructEnumerations();
172-
Enum66::byName($name);
173-
}
174-
}
175-
176165
public function benchByNameAndInstantiate()
177166
{
178167
$this->destructEnumerationInstances();
@@ -188,14 +177,6 @@ public function benchByOrdinal()
188177
}
189178
}
190179

191-
public function benchByOrdinalAndInitialize()
192-
{
193-
foreach ($this->ordinals as $ord) {
194-
$this->destructEnumerations();
195-
Enum66::byOrdinal($ord);
196-
}
197-
}
198-
199180
public function benchByOrdinalAndInstantiate()
200181
{
201182
$this->destructEnumerationInstances();

0 commit comments

Comments
 (0)