1. Mahout
  2. MAHOUT-253

Proposal for high performance primitive collections.


    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Integration
    • Labels:


      A proposal for template-driven collections library (lists, sets, maps, deques), with specializations for Java primitive types to save memory and increase performance. The "templates" are regular Java classes written with generics and certain "intrinsics", that is blocks replaceable by a regexp-preprocessor. This lets one write the code once, immediately test it (tests are also templates) and generate primitive versions from a single source.

      An additional interesting part is the benchmarking subsystem written on top of JUnit

      There are major differences from the Java Collections API, most notably no interfaces and interface-compatible views over sub-collections or key/value sets. These classes also expose their internal implementation (buffers, addressing, etc.) so that the code can be optimized for a particular use case.
      These motivations are further discussed here, together with an API overview.

      I am curious what you think about it. If folks like it, Carrot Search will donate the code to Mahout (or Apache Commons-?) and will maintain it (because we plan to use it in our internal projects anyway).

        280 kB
        Dawid Weiss


        Dawid Weiss created issue -
        Dawid Weiss made changes -
        Field Original Value New Value
        Attachment [ 12430508 ]
        Sean Owen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not A Problem [ 8 ]
        Sean Owen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]


          • Assignee:
            Dawid Weiss
            Dawid Weiss
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: