LL vs Arrays (speed)

Everything else that doesn't fall into one of the other PB categories.
User avatar
kenmo
Addict
Addict
Posts: 2051
Joined: Tue Dec 23, 2003 3:54 am

LL vs Arrays (speed)

Post by kenmo »

Just wondering, is there any speed difference between linked lists and arrays? Because I am working on a rather cpu-intensive image generator, but after writing a section with linked lists I realized I could have used arrays. Would this possibly speed the process up? Id like to know the technical answer before I rewrite the code.
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Re: LL vs Arrays (speed)

Post by NoahPhense »

kenmo wrote:Just wondering, is there any speed difference between linked lists and arrays? Because I am working on a rather cpu-intensive image generator, but after writing a section with linked lists I realized I could have used arrays. Would this possibly speed the process up? Id like to know the technical answer before I rewrite the code.
Read :: viewtopic.php?t=7960

- np
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

This one might also be interesting: viewtopic.php?p=54385

Timo
quidquid Latine dictum sit altum videtur
User avatar
kenmo
Addict
Addict
Posts: 2051
Joined: Tue Dec 23, 2003 3:54 am

Post by kenmo »

Thanks guys. So in PB, technically: the more you have (same number of slots in each), the faster arrays will be over linked lists. Makes sense, actually. Thanks for the info.
Post Reply