#25103: Improve webstats performance
-----------------------------+------------------------------
 Reporter:  iwakeh           |          Owner:  metrics-team
     Type:  enhancement      |         Status:  needs_review
 Priority:  Medium           |      Milestone:
Component:  Metrics/Library  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:  #25100           |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+------------------------------

Comment (by karsten):

 Interesting approach. I'd probably have stored the `int` value rather than
 the `T` reference. But I see how your approach should work as well.

 One thing, though: you're never using the `int` value returned by
 `numFromList` other than for immediately looking up the reference in the
 list. Why not use a `HashSet` instead and change `numFromList` to
 `fromSet` that returns the `T` reference directly? Just in case there are
 more than just a few thousand entries in that list. And even with those,
 the set might be faster.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25103#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Reply via email to