Skip to content

Rework SIMPLE-VECTOR implementation using openjdk8 facilities#624

Closed
easye wants to merge 18 commits into
armedbear:masterfrom
easye:java-generics/20230903a
Closed

Rework SIMPLE-VECTOR implementation using openjdk8 facilities#624
easye wants to merge 18 commits into
armedbear:masterfrom
easye:java-generics/20230903a

Conversation

@easye
Copy link
Copy Markdown
Collaborator

@easye easye commented Sep 3, 2023

(INCOMPLETE) Start of exploration on simplying and improving support for sequences, vectors, and arrays by using generics and functions shipped as part of openjdk8.

Goals:

  1. Simplify class structure with parametertized types

  2. Use openjdk8 methods like Arrays.fill(), sort() et. al.

  3. Reduce memory use for "oversized" buffers

  4. Optimize speed of basic operations

TODO need some benchmarks to test before/after

(INCOMPLETE) Start of exploration on simplifying and improving support
for sequences, vectors, and arrays by using generics and functions
shipped as part of openjdk8.

Goals:

1)  Simplify class structure with parameterized types

2)  Use openjdk8 methods like Arrays.fill(), sort() et. al.

3)  Reduce memory use for "oversized" buffers

4)  Optimize speed of basic operations

TODO need some benchmarks to test before/after
@easye easye force-pushed the java-generics/20230903a branch from 429bc97 to b4abe8d Compare September 3, 2023 12:16
@easye
Copy link
Copy Markdown
Collaborator Author

easye commented Sep 5, 2023

*** Use of generics doesn't seem to help implementation BasicVectorBuffer

  1. One has to "record" the specialization via adding the class to the
    constructor anyways.

  2. The parameterized type can't be used as discriminator type for
    different functions by arguments, as type erasure makes things an
    Object anyways.

Superseded by #624

@easye easye closed this Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant