Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
5cb33c9
Update .gitignore
expanded-for-real Jun 1, 2025
63313e4
initial commit for imprint-java
Jun 1, 2025
dd4fdbc
initial commit for imprint-java
expanded-for-real Jun 1, 2025
bce1d13
Add GitHub Actions CI workflow for automated testing
Jun 2, 2025
f5d90b5
Merge remote-tracking branch 'origin/dev' into dev
Jun 2, 2025
72c468f
Update GitHub Actions workflow to use upload-artifact@v4
Jun 2, 2025
468d682
Add Gradle wrapper validation to CI workflow
Jun 2, 2025
cf05b13
Fix gitignore to include gradle-wrapper.jar for CI
Jun 2, 2025
d0d7983
Force add gradle-wrapper.jar to repository
Jun 2, 2025
f2cdd1b
Update wrapper validation action to v3
Jun 2, 2025
57c8249
Fix Javadoc syntax errors and disable strict Javadoc checking
Jun 2, 2025
edb3057
Add JMH benchmark .bat and .sh for full suite benchmarking and perfor…
Jun 2, 2025
2853e3f
fix map serialization error in benchmark test and streamline ci file …
Jun 2, 2025
3a5a113
Add execute permissions back for gradlew in CI
Jun 2, 2025
50a288b
Add some more string based performance benchmarks and try to make str…
Jun 2, 2025
ea1c4c4
Merge pull request #2 from imprint-serde/faster-strings
expanded-for-real Jun 2, 2025
43cab28
second main commit to address initial commits
expanded-for-real Jun 3, 2025
fdb8a56
additional cleanup to address concerns in https://github.com/imprint-…
Jun 3, 2025
2e56688
minor style fixes
Jun 3, 2025
9353388
minor style fixes again
Jun 3, 2025
09d0377
minor style fixes on benchmark tests and supress unused
Jun 3, 2025
6209bb1
minor reordering
Jun 4, 2025
ace7c67
Merge branch 'main' into dev
Jun 4, 2025
4632e01
Full comprehensive comparison tests with a lot of other libraries + s…
Jun 5, 2025
3738861
replace deprecated gradle methods with latest
Jun 5, 2025
12d2823
Merge Comparisons into dev branch (#8)
expanded-for-real Jun 5, 2025
f7a6e8e
Lazy load of directory and header data
Jun 5, 2025
2834dbb
Merge remote-tracking branch 'origin/main' into dev
Jun 5, 2025
83ed961
minor cleanup
Jun 5, 2025
a605b65
minor cleanup
Jun 5, 2025
aacddeb
minor cleanup
Jun 5, 2025
3bf81ad
Actually fixes offsets and read Byte Values for Maps and Arrays even …
Jun 5, 2025
7eaa6e9
change CI file to use JMH plugin to respect iteration and warmup valu…
Jun 5, 2025
32640cd
ok plugin didn't work apparently so reverting that and just reducing …
Jun 5, 2025
2d882c2
Merge branch 'dev' into lazy-directory
Jun 5, 2025
880aeb0
trying to update github ci to make jmh actually work correctly
Jun 5, 2025
8831922
lazy directory deserialization
Jun 6, 2025
e361cf0
Merge branch 'main' into dev
Jun 6, 2025
73eade6
remove extra comments
Jun 6, 2025
02866d5
remove extra comments
Jun 6, 2025
6278665
Merge branch 'refs/heads/main' into dev
Jun 7, 2025
09443eb
Add merge and project APIs; optimize/simplify ImprintBuffers with Tre…
Jun 7, 2025
0c7b237
Optimize serialization path and remove ImprintWriter code in favor of…
Jun 7, 2025
574323e
Allow for record creation path from builder to bypass extra TreeMapping
Jun 7, 2025
b2bebee
Calculate estimated size as fields are added instead of deferring it
Jun 7, 2025
f1df8d7
Use idiomatic Directory interface and optimize builder
Jun 8, 2025
7420b7f
add large object profiling and refactor tests
Jun 8, 2025
4d86447
add Thrift competitor and fix framework issues
Jun 9, 2025
a722e45
Add single-field access test
Jun 9, 2025
9d0f2c8
correct benchmark methodology for fairness
Jun 9, 2025
4b2664c
micro-optiomize and attempt to make ComparisonBenchmark tests a littl…
Jun 9, 2025
b4cf85d
final optimization and reorganization into better project structure
Jun 11, 2025
cce8994
final optimization and reorganization into better project structure
Jun 12, 2025
f06ad98
Merge branch 'main' into zero-copy
Jun 12, 2025
50c8a4b
track custom map
Jun 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 58 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ dependencies {
// Suppress SLF4J warnings
jmhImplementation 'org.slf4j:slf4j-nop:1.7.36'

// Competitor libraries for benchmarking (JMH only)
// Other serialization libraries for benchmarking (JMH only)
jmhImplementation 'com.google.protobuf:protobuf-java:3.25.1'
jmhImplementation 'org.apache.avro:avro:1.11.3'
jmhImplementation 'com.fasterxml.jackson.core:jackson-databind:2.16.0'
jmhImplementation 'com.google.flatbuffers:flatbuffers-java:23.5.26'
jmhImplementation 'com.esotericsoftware:kryo:5.4.0'
jmhImplementation 'org.msgpack:msgpack-core:0.9.8'
jmhImplementation 'org.msgpack:jackson-dataformat-msgpack:0.9.8'
jmhImplementation 'org.apache.thrift:libthrift:0.19.0'
jmhImplementation 'javax.annotation:javax.annotation-api:1.3.2'
}

protobuf {
Expand Down Expand Up @@ -137,20 +139,74 @@ tasks.register('generateFlatBuffers', Exec) {
}
}

// Task to download the Thrift compiler
tasks.register('downloadThrift', Exec) {
description = 'Download Thrift compiler'
group = 'build setup'

def thriftVersion = "0.19.0"
def thriftExecutable = file("${buildDir}/thrift/thrift.exe")
def thriftUrl = "https://archive.apache.org/dist/thrift/${thriftVersion}/thrift-${thriftVersion}.exe"

outputs.file(thriftExecutable)

onlyIf {
!thriftExecutable.exists() && System.getProperty('os.name').toLowerCase().contains('windows')
}

doFirst {
println "Downloading Thrift compiler for Windows from $thriftUrl..."
thriftExecutable.parentFile.mkdirs()
}

commandLine 'curl', '-L', '-o', thriftExecutable.absolutePath, thriftUrl

doLast {
println "Thrift compiler downloaded to: ${thriftExecutable}"
}
}

// Task to generate Java code from Thrift IDL files for JMH benchmarks
tasks.register('generateJmhThrift', Exec) {
dependsOn tasks.downloadThrift
description = 'Generate Java classes from Thrift schema'
group = 'build'

def thriftExecutable = file("${buildDir}/thrift/thrift.exe")
def schemaFile = file('src/jmh/thrift/test_record.thrift')
def outputDir = file('build/generated-src/thrift/jmh/java')

// Only run if the thrift executable exists (i.e., on Windows)
onlyIf { thriftExecutable.exists() }

commandLine thriftExecutable.absolutePath, '-r', '--gen', 'java', '-o', outputDir.absolutePath, schemaFile.absolutePath

inputs.file(schemaFile)
outputs.dir(outputDir)

doFirst {
outputDir.mkdirs()
}
}


// Add generated FlatBuffers sources to JMH source set
sourceSets {
jmh {
java {
srcDir 'build/generated/source/flatbuffers/jmh/java'
srcDir 'build/generated-src/thrift/jmh/java'
srcDir 'build/generated/sbe/java'
}
proto {
srcDir 'src/jmh/proto'
}
}
}

// Make JMH compilation depend on FlatBuffers generation
// Make JMH compilation depend on generation tasks
compileJmhJava.dependsOn generateFlatBuffers
compileJmhJava.dependsOn generateJmhThrift

// Handle duplicate proto files
tasks.named('processJmhResources') {
Expand Down
21 changes: 10 additions & 11 deletions src/jmh/flatbuffers/test_record.fbs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
namespace com.imprint.benchmark;
namespace com.imprint.benchmark.flatbuffers;

table TestRecordFB {
id: int;
name: string;
price: double;
table TestRecord {
id: string;
timestamp: long;
flags: int;
active: bool;
category: string;
tags: [string];
metadata_keys: [string];
metadata_values: [string];
extra_data: [string];
value: double;
data: [ubyte];
tags: [int];
metadata: [string]; // Representing map as a flat list of key/value strings for simplicity
}

root_type TestRecordFB;
root_type TestRecord;
Loading
Loading