armedbear / abcl

Armed Bear Common Lisp <git+https://github.com/armedbear/abcl/> <--> <svn+https://abcl.org/svn> Bridge
https://abcl.org#rdfs:seeAlso<https://gitlab.common-lisp.net/abcl/abcl>
Other
291 stars 29 forks source link

Rework SIMPLE-VECTOR implementation using openjdk8 facilities #624

Closed easye closed 1 year ago

easye commented 1 year ago

(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

easye commented 1 year ago

*** 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 https://github.com/armedbear/abcl/pull/624