score:2
Accepted answer
If you are not limited to use only Scala/Java maps than for exceptional performance you can peek 3rd party libraries that have maps specialized for Long/Long key/value pairs.
Here is not so outdated overview of such kind of libraries with benchmark results for Int/Int pairs.
Source: stackoverflow.com
Related Query
- For Scala 2.13, what is the fastest method for updating a LongMap, HashMap, or TrieMap with millions of updates?
- What is the rule for parenthesis in Scala method invocation?
- What is the scala percent operator (%) and at method for strings do?
- Scala 2.12: What is the equivalent of Java 8 method reference for universally quantified SAM trait?
- What is the best way to assert for a scala method whose return type is Future[Unit]
- What is the good code style for scala when calling a method of an object
- What is the motivation for Scala assignment evaluating to Unit rather than the value assigned?
- What is the fastest way to sum a collection in Scala
- What special rules does the scala compiler have for the unit type within the type system
- What is the Scala syntax for summing a List of objects?
- what are the options for hadoop on scala
- What is the accepted/recommended syntax for Scala code with lots of method-chaining?
- What are the use cases for Scala 2.9's try...catch generalization?
- What is the Scala type-programming analogy for the `this` keyword?
- Why does Scala evaluate the argument for a call-by-name parameter if the method is infix and right-associative?
- What are the best practices to deploy and host artifacts for a Docker Multicontainer environment in Elasticbeanstalk for Scala Apps?
- What is the Scala type mapping for all Spark SQL DataType
- What is the syntax for creating a Map in Scala that uses an enum as a key?
- What algorithm is used by the Scala library method Vector.sorted?
- What is the fastest way to compile Scala files using maven?
- What are the guarantees for scala access qualifiers?
- What are the obstacles for Scala having "const classes" a la Fantom?
- What is the fastest way to subtract two arrays in scala
- What is a "build manager" for scala in the scala ide extensions for Eclipse?
- What is the Scala syntax for calling a function with variadic arguments but with named arguments?
- What is the difference between curly bracket and parenthesis in a Scala for loop?
- What is the keyboard shortcut for ⇒ in your Scala editor of choice?
- Scala what is the difference between defining a method in the class instead on the companion object
- What is the first semicolon in `addCommandAlias` method used for in SBT?
- Where to put favicon for a scala Spray application (i.e. what is the root of the site?)?
More Query from same tag
- Mixins vs composition in scala
- How to find distinct ngrams in scala?
- Spark transform RDD
- Why does using underscore make this list comprehension only print one dot?
- Why does Scala use a ForkJoinPool to back its default ExecutionContext?
- overriding default Parallel Collections behavior in scala
- Logging request time of a Play!2 Scala application
- SPARK Mlllib - <console>:37: error: value filter is not a member of Long
- How to create bins on a column in a data frame
- scala regex to match tab separated words from a string
- Scala How to use pattern matching with a non generic LazyList?
- Scala Future or other way to execute Java void methods in parallel
- Get a type identified by a string in the Scala macros
- Is there a simpler form that could replace new ActionListener()?
- extend parent in scala using field constants
- Spark: java.lang.IllegalArgumentException: requirement failed kmeans (mllib)
- Tail Recursive findNextAndTail in Scala
- Using a SAT solver from Scala class
- Scala Play json transformer, prune a branch from input json if a condition
- Are Play form JSON parsers filtering out empty arrays incorrectly?
- intellij/activator/sbt are downloading dependencies previously downloaded by the other
- match may not be exhaustive occurred when matching List
- Creating a Java InputStream from an Enumerator[Array[Byte]]
- Scala: Value :: is not a member of Int
- Defining an Ordering over subtypes in Scala
- Read JSON data from Blob where the files are stored inside date folders which auto increments everyday
- Akka http match path
- Why array values not displaying within a Quotes in Scala?
- Coalesce in spark scala
- Logging and ignoring exception from Task in scalaz-streams