Storing the vertices in a separate array and having the edges contain vertex numbers instead of vertex coordinates



next up previous contents
Next: Using integers instead Up: Design Tradeoffs and Previous: Design Tradeoffs and

Storing the vertices in a separate array and having the edges contain vertex numbers instead of vertex coordinates

 

This is the choice between immediate versus indirect data. Storing the vertex coordinates immediately in the edges makes processing the edges cheaper. Depending on wordlengths, the storage will be the same or greater. If a vertex position takes 2 bytes each for and , and a vertex number takes 4 bytes, then the storage is identical. On the other extreme, if each coordinate takes 4 bytes, but a vertex number takes only 2, then the indirect method will be smaller. With memory prices for workstations at $40 per megabyte and falling, then memory is not so important as before. However, big programs will always execute more slowly than otherwise equivalent small programs because of bus bandwidth limitations, and because the big programs will use the cache less efficiently.

One problem with not storing vertices separately is that then we would not be able to store associated information, such as what polygon of the other map contained which vertex, and would need to recompute this for every edge on that vertex.



Wm Randolph Franklin
Wed Dec 14 14:03:28 EST 1994