Use more memory efficient method of storing numbers#6
Conversation
|
Agreed. Anything that smells of proceduralness should be removed immediately. I'm looking at you arrays. |
|
Why don't we store the values within a Java Bean. Then we can persist them to a database and get all sorts of delicious metrics. Also, is this threadsafe? |
There was a problem hiding this comment.
leave a break line before return
|
Why not just use a hashing algorithm to store the numbers in a map, keyed by string index? |
|
I would recommend a hash key generator then |
|
Its becoming clear that we need to rearchitect the way we handle number
|
|
I'm thinking, that instead of a hash generator, perhaps we should architect our own NumberLinkedListNode class, and then use a doubly-linked circular linked list. This maximizes the efficiency of number operations while allowing us to effectively use the object-oriented paradigm. Thoughts? |
SplObjectStorage is better suited for what we're trying to do in NumberCollection.