In fact, I think my implementation should not only be faster but it is also safer due to the *-unlikely event?-* of reaching Long.MAX_VALUE, a side by side comparison:
- Both implementations "compare and set" the value atomically, but mine does it for an *AtomicInteger vs AtomicLong* which is cheaper. - My implementation does one increment of an integer and compare it against the size and return either the new value if less or equal than size or zero, the original implementation always MOD a long value which according to my research *-not a very extensive one-* moding cost > dividing cost > multiplying cost > incrementing cost The other issue not strictly related with my implementation is that the static and singleton *NoRoutee* instance is a private member of *Router.scala* making it unusable for *RoutingLogic* extenders, and Akka does use equality *-if routee == NoRoutee then deadletters ! tell...-* which makes anyone's custom *RoutingLogic* implementation not able to behave like any other Akka provided RoutingLogic so I think it needs to be made public and mentioned in the documentation clarifying that returning it from a RoutingLogic will drop the message into the dead letters. Best regards, Guido. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.