I am searching for a language/library (preferably JVM-based) that handles numeric values (integer and floating point numbers) in both convenient and efficient manner.
- Convenient: supported by the collection framework and generics.
- Efficient: incurs no noticeable overhead when the primitives are the
building block in a data-heavy data-processing software
(specifically, processing multiple GB of texts with >100,000,000
items).
Deficiencies of the current languages:
- Plain Java: auto-boxing is quite convenient, but it has substantial overhead.
- Scala and Kotlin: seem to rely also on Java's boxed primitives, so no efficiency advantage here.
- Python: again, seems to box all numeric values, and we ran into prohibitive performance problems with vanilla Python. Numpy, which provides a different implementation, does not support the needed features.
Is there a language that handles primitives with the same convenience but efficiently (compared to that language general performance)?