https://github.com/ruislan/korderbook
simple order book
https://github.com/ruislan/korderbook
Last synced: 17 days ago
JSON representation
simple order book
- Host: GitHub
- URL: https://github.com/ruislan/korderbook
- Owner: ruislan
- License: apache-2.0
- Created: 2023-10-07T05:22:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-11T09:35:46.000Z (over 2 years ago)
- Last Synced: 2025-02-25T12:48:30.210Z (over 1 year ago)
- Language: Java
- Size: 83 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KOrderBook
A simple order match engine in Java and Kotlin
* JDK: 21
* Kotlin: 1.9.20
* Gradle: 8.4
## Run Locally
import into Jetbrains IDEA, Run test.
## Benchmark
### MacBook Pro
MacBook Pro 16, i9 2.3G 4 cores, 16 GB 2667 MHz DDR4.
Jmh 1.3.7
```kotlin
warmupIterations = 1
threads = 100
```
| Benchmark | Mode | Cnt | Score | Units | Error |
|:---------------------------------------------------|:-----:|:---:|:-----------:|:-----:|:------------:|
| java.OrderBookJavaPerformance.placeLimitOrders | thrpt | 5 | 1412397.568 | ops/s | ± 205503.128 |
| kotlin.OrderBookKotlinPerformance.placeLimitOrders | thrpt | 5 | 1564446.464 | ops/s | ± 367446.901 |
```kotlin
warmupIterations = 1
threads = 200
```
| Benchmark | Mode | Cnt | Score | Error | Units |
|:--------------------------------------------------------|:-----:|:---:|:-----------:|:------------:|:-----:|
| java.OrderBookJavaPerformance.placeLimitOrders | thrpt | 5 | 1300184.609 | ± 218893.053 | ops/s |
| kotlin.OrderBookKotlinPerformance.placeLimitOrders | thrpt | 5 | 1519423.199 | ± 211588.375 | ops/s |
### PC
Windows 11, Inter i7 8700k 3.7G 6 cores, 32G 3000 MHz DDR4
```kotlin
warmupIterations = 1
threads = 100
```
| Benchmark | Mode | Cnt | Score | Units | Error |
|:---------------------------------------------------|:-----:|:---:|:-----------:|:-----:|:------------:|
| java.OrderBookJavaPerformance.placeLimitOrders | thrpt | 5 | 2383541.749 | ops/s | ± 163721.243 |
| kotlin.OrderBookKotlinPerformance.placeLimitOrders | thrpt | 5 | 2683735.289 | ops/s | ± 127344.966 |
```kotlin
warmupIterations = 1
threads = 200
```
| Benchmark | Mode | Cnt | Score | Units | Error |
|:---------------------------------------------------|:-----:|:---:|:-----------:|:-----:|:------------:|
| java.OrderBookJavaPerformance.placeLimitOrders | thrpt | 5 | 2293407.721 | ops/s | ± 100826.909 |
| kotlin.OrderBookKotlinPerformance.placeLimitOrders | thrpt | 5 | 2508938.276 | ops/s | ± 228688.160 |