Could this be caused by the vector creation command doing a linear search for the existence of the vector name? If so, maybe a hash table of vector names could remedy this.

This latency is a real issue I'm facing where I could have over 5000 vectors being created at a given time.

Sat, 04 Sep 2004 01:18:59 GMT

George A. Howlet#2 / 3

BLT vector creation: creation time grows as number of vectors created grows

Quote:

> I've noticed that vector creation time increases as the number of > vectors created increases. Below is a dramatic illustration. This > example was performed using BLT 2.4x with Tcl 8.3.2 on Windows NT. > % time { for {set i 0} {$i< 2000} {incr i} { > blt::vector create #auto > }} > 4607000 microseconds per iteration > % time { for {set i 0} {$i< 2000} {incr i} { > blt::vector create #auto > }} > 15372000 microseconds per iteration > % time { for {set i 0} {$i< 2000} {incr i} { > blt::vector create #auto > }} > 27729000 microseconds per iteration > Could this be caused by the vector creation command doing a linear > search for the existence of the vector name? If so, maybe a hash table > of vector names could remedy this. > This latency is a real issue I'm facing where I could have over 5000 > vectors being created at a given time.

Your diagnosis is exactly right. There's a lot of (redundant) checking going on for a unique vector name. I've fixed this so that vector generation appears linear.

BLT vector creation: creation time grows as number of vectors created grows

George, Thanks for the fix. I'll look forward to the patch. Todd

Quote:

> > I've noticed that vector creation time increases as the number of > > vectors created increases. Below is a dramatic illustration. This > > example was performed using BLT 2.4x with Tcl 8.3.2 on Windows NT.