📧 [email protected]
Bethibande#8532
memoryapi's Introduction
memoryapi's People
memoryapi's Issues
File mapping
Add support for mapping files to memory.
Rewrite
This api needs to be entirely rewritten and restructured.
There have been too many workarounds/reimplementations of default behaviour of the IOAccess class.
The IOAccess is anything but ideal, it's causing performance issues by completing unecessary checks and more.
The rewrite should also include a builder class to replace all the static methods in the IOAccess class to allow for further customization.
Also, the def and impl modules should be merged, there is no longer a reason for these to be two seperate modules.
Access memory address
Add support for creating an access for reading/writing at a given memory address
Better native Memory performance
The IOScopedMemory class currently writes all data using MemorySegment.ofArray and then segment.copyOf(segment).
This is very slow and inefficient, especially when writing primitive values like integers.
MemorySegment.copyOf should only be used to write byte arrays or other types of arrays.
The IOScopedMemory class should use the MemoryAccess class to write these values instead.
There currently is no way for the IOAccessible class to handle these things, as the IOAccess class turns all primitive types into byte-arrays and then delegates the write to the IOAccessible.write(byte[], long, int) or IOAccessible.set(byte[], long, long, int) methods.
Performance
During a benchmark compare the performance of a Java ByteBuffer to an IOAccess. The IOAccess performance was considerably worse than the ByteBuffers performance, using heap byte arrays.
Also the MemorySegment performance doesn't seem very good either, perhaps replace this with a custom implementation using sun.misc.Unsafe
ByteOrder support
Add support for specifying a byte-order for reading/writing primitives.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.