Skip to content

Commit 9302617

Browse files
committed
speed test added
1 parent 1039625 commit 9302617

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Linna Framework](logo-array.png)
1+
![Linna Array](logo-array.png)
22
<br/>
33
<br/>
44
<br/>
@@ -59,12 +59,12 @@ $array[] = new Bar();
5959
```
6060
## Performance consideration
6161
Compared to the parent class [ArrayObject](http://php.net/manual/en/class.arrayobject.php) typed arrays are slower on writing
62-
approximately from 15x to 20x. The slowness is due to not native `__construct()` and not native `offsetSet()`.
62+
approximately from 6x to 8x. The slowness is due to not native `__construct()` and not native `offsetSet()`.
6363
Other operations do not have a speed difference with the native ArrayObject.
6464
```php
6565
use Linna\TypedArray;
6666

67-
//slower from 15x to 20x.
67+
//slower from 6x to 8x.
6868
$array = new TypedArray('int', [1, 2, 3, 4]);
6969
$array[] = 5;
7070

@@ -74,3 +74,4 @@ $arrayElement = $array[0];
7474
$elements = $array->count();
7575
```
7676

77+
![Array Speed Test](array-speed-test.png)

array-speed-test.png

53.3 KB
Loading

0 commit comments

Comments
 (0)