Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Compares the performance of JNA interface mapping, direct mapping, and raw dlopen().

Notifications You must be signed in to change notification settings

gobley/test-jna-direct-mapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JNA Direct Mapping Benchmark

Compares the performance of JNA interface mapping, direct mapping, and raw dlopen()/dlsym().

How to run

Simply execute make to run the benchmarks.

make [NUM_SAMPLES=<# of samples>] [NUM_INVOCATIONS=<# of invocations in each sample>]

Benchmark Results (in GitHub Actions)

Please see here for the workflow run.

Windows macOS Ubuntu
Windows macOS Ubuntu

Comparison

OS Interface Mapping (seconds) Direct Mapping (seconds) Raw dlopen()/LoadLibrary()
Windows 0.0514090 0.0129870 (3.958x faster) 0.0001917 (268.114x faster)
macOS 0.0273280 0.0063170 (4.326x faster) 0.0001028 (265.765x faster)
Ubuntu 0.0440980 0.0111250 (3.964x faster) 0.0002869 (153.705x faster)

About

Compares the performance of JNA interface mapping, direct mapping, and raw dlopen().

Topics

Resources

Stars

Watchers

Forks