Skip to content

Commit

Permalink
add results for AnyMatchVsContainsAllBenchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
stsypanov committed May 25, 2018
1 parent ba7d78e commit 6f76536
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,18 @@ return accumulator;
Итоги замеров см. в results/BoxingBenchmark.md

Также см. [IDEA-189336 New inspection 'Wrapper type may be primitive'](https://youtrack.jetbrains.com/v2/issue/IDEA-189336)

### AnyMatchVsContainsBenchmark

Показывает разницу между вызовом
```java
Arrays.asList().stream().anyMatch()
```
и
```java
Arrays.asList().contains();
```

Итоги замеров см. в results/AnyMatchVsContainsAllBenchmark.md.md

См. [Arrays.stream.anyMatch can be simplified](https://youtrack.jetbrains.com/issue/IDEA-187623)
13 changes: 13 additions & 0 deletions results/AnyMatchVsContainsAllBenchmark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

| | | | Java 8 | | Java 9 | | |
|-----------|------|------|-----------|------|----------|------|------|
| Benchmark | Mode | Cnt | Score| Error| Score| Error| Unit |
| anyMatch | avgt | 10 | **6,0**| 0,0 | **5,8**| 0,0 | ns/op|
| contains | avgt | 10 | **51,9**| 1,7 | **20,5**| 0,2 | ns/op|
|-----------|------|------|-----------|------|----------|------|------|
| anyMatch | avgt | 100 | **24,2**| 0,2 | **49,9**| 0,3 | ns/op|
| contains | avgt | 100 | **242,6**| 2,2 | **172,7**| 1,0 | ns/op|
|-----------|------|------|-----------|------|----------|------|------|
| anyMatch | avgt | 1000 | **201,6**| 2,4 | **185,2**| 2,0 | ns/op|
| contains | avgt | 1000 | **2438,8**| 43,3 |**1435,0**|112,5 | ns/op|

0 comments on commit 6f76536

Please sign in to comment.