You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -33,31 +33,32 @@ The following PHP JSON Patch libraries are included in the benchmark:
33
33
The benchmarks were executed on the following system:
34
34
35
35
-**PHP Version:** 8.2.2-nts
36
-
-**Operating System:** Windows 10 Porfessional
36
+
-**Operating System:** Windows 10 Professional
37
37
-**Memory:** 32GB RAM (4 x 8 GB) 3600 MT/s C18
38
38
-**Processor:** Ryzen 7 3700x
39
39
40
40
41
41
## RFC 6902 Compliance Test Results
42
42
43
-
The compliance test strictly checks if the output json of each library is consistent with the RFC and if the library performs atomic operations. \
44
-
Many libraries implicitly converts objects into arrays and while this make the compliace test fail it is still fine if you just have to consume the document in PHP.
43
+
The compliance test strictly checks if the output json of each library is consistent with the RFC and if the library performs atomic operations.
> **Note:** Libraries that fails this test will be benchmarked as well if no error occurs
55
+
> mikemccabe and xp-forge libraries implicitly converts objects into arrays and while this make the compliace test fail it is still fine if you only have to consume the document in PHP. The other ones that failed the compliance test are not reliable for a real-world use
56
+
57
+
> Libraries that fails this test will be benchmarked as well if no error occurs
57
58
58
59
## Benchmark Results
59
60
60
-
The following table shows the average time each library took to apply a patch with 1000 operations to a target document as summary of the performance. \
61
+
The following table shows the average time each library took to apply a patch with 1000 operations to a target document as summary of the performance.
61
62
The actual benchmark data is available [here](https://docs.google.com/spreadsheets/d/1ZTDWh1k-zzhYHqZB3JMD2WRV0bPRIWUMRbLiMJhMLHk/edit?usp=sharing).
62
63
63
64
| Library | Microseconds |
@@ -70,8 +71,9 @@ The actual benchmark data is available [here](https://docs.google.com/spreadshee
70
71
| php-jsonpatch/php-jsonpatch | 10970 |
71
72
| remorhaz/php-json-patch | N/A (needs many hours to complete) |
72
73
73
-
> **Note:** These results are indicative and may vary depending on the specific use case and system environment.
74
+
> Unfortunately remorhaz skyrocket out of the chart just with 20 operations patch. It is in the range of O(2^n) if not worse.
74
75
76
+
> These results are indicative and may vary depending on the specific use case and system environment.
75
77
76
78
## How to Run the Benchmarks
77
79
@@ -136,4 +138,4 @@ Special thanks to the authors of the JSON Patch libraries tested in this benchma
136
138
137
139
## License
138
140
139
-
This software is licensed under the [MIT License](LICENSE.md).
141
+
This software is licensed under the [MIT License](LICENSE.md).
0 commit comments