GithubHelp home page GithubHelp logo

memoryapi's Introduction

memoryapi's People

Contributors

bethibande avatar

Watchers

 avatar

memoryapi's Issues

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.

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.