Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cliff Moon
committed
Mar 6, 2009
1 parent
9d6b1c8
commit 36815a1
Showing
2 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36815a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, just curious why you don’t use ETS instead of the judy-arrays; what are the benefits? Cheers —Tobbe
36815a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much faster than using an ETS table.
36815a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm…how can it be much faster? ETS is an in-memory hash table and as I understand it you’ll access the Judy-array lib (also in-memory) via an linked-in driver. Or perhaps I have misunderstod how you plan to use them? Do you have any measurments comparing the two?
36815a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talking strictly of the key/value get and put, smaller sized tables will be slightly faster in ets. After the table grows beyond a certain size, judy arrays will perform better. The more overriding concern, however, is making the key value lookup and insert work correctly and performantly with an LRU. The least algorithmically complex way I could find to do that is storing references to nodes in a doubly linked list for the LRU. And doing a scheme like that from the Erlang side instead of C would be challenging, to say the least. I’m on the train right now and must conserve battery, so I’ll post performance numbers later on today.