User talk:Larry

do u know anything about bignum?? maybe vector is not a good idea and linked list is?

I still haven't have a clean implementation that I'm comfortable with, but as far as I know, fixed size arrays (or, fixed small size, with repeated doubling, amortized O(n log n) for the resizing) is the "best" way, but I'm not too sure about it, and I don't have anything that requires BigNum on a high ranklist.. so no clue.. Larry 22:23, 18 Jan 2005 (EST)

Hmm... well, arrays dont work well because i find it hard to manage (create/deallocation/passing as param). I mean, is there any advantage for accessing the middle of the array(vector) against a list? so far, all i am doing is looping from one end to another, so vectors provide no advantage... (it is disadvantaged right now because it could only push_back efficiently, there is no push_front : --Jack 23:06, 18 Jan 2005 (EST)

Just because you find it hard to manage doesn't mean it doesn't work well.. =P

I think it's perfectly fine, if you know what you're doing. It optimizes over vector. It shouldn't be too difficult.. but if you're only comparing vector vs linked list, there's probably not much difference, as most of the function you use will probably need the entire list anyhow.. it's up to you.

(Arrays also have the benefit of excellent locality...) Larry 23:28, 18 Jan 2005 (EST)

arrays
correct me if i am wrong, but you cant use a map/set or most other STL containers with an array of integers, but you could use a vector or list

why do you need STL in BigNum?

Also, I'm talking about wrapping the array in a class (or struct), so I don't mean a naked array, which you can still use STL on.. Larry 09:26, 19 Jan 2005 (EST)

I see... well, one of the points of this was to cut down the code, which the is doing nicely to me for trade offs in time. I dont really need STL, but a problem may be such that using STL will make things easier. --Jack 10:37, 19 Jan 2005 (EST)