Re: 2.6 feature request: foreach (off topic)

new topic     » topic index » view thread      » older message » newer message

Robert Craig wrote:

<snip>

> PureBASIC linked lists vs. Euphoria sequences:
>
> Did they tell you that each element of a PureBASIC linked list
> has a 4-byte pointer to "next", a 4-byte pointer to "previous"
> and probably at least 8 bytes of overhead for malloc?
>
> Did they tell you that to "SelectElement" item number one million,
> they might have to internally follow a chain of one million pointers
> in memory? i.e. after converting from sequences to PureBASIC lists,
> you might find your program running a *million* times slower,

Thanks for pointing this out clearly! That's actually what I had
assumed, but I was not sure.

> while each integer uses 20 bytes of space in memory?

Pfffffffffff ... smile

> And there's no error checking, so if you ask
> for an invalid element, your program will likely crash.
>
> They of course have (inflexible) arrays:
>
>   "Once an array is 'sized' it can be resized
>    but its content will be deleted"
>   (ouch!)
>
>   "Arrays are always globally accessable in PureBasic."
>   (no way to restrict access by scope!)

Pfffffffffff ... smile

Regards,
   Juergen

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu