Disclaimer

The content of this blog is my personal opinion only. Although I am an employee - currently of Nvidia, in the past of other companies such as Iagination Technologies, MIPS, Intellectual Ventures, Intel, AMD, Motorola, and Gould - I reveal this only so that the reader may account for any possible bias I may have towards my employer's products. The statements I make here in no way represent my employer's position, nor am I authorized to speak on behalf of my employer. In fact, this posting may not even represent my personal opinion, since occasionally I play devil's advocate.

See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.

Thursday, August 02, 2012

Futures make sets safe

Set notation is very convenient.

E.g.  
index_set = { 1, 2, 3}
array[ index_set ] = 0
rather than a loop

But a problem with set notation is that intermediate sets can be very large.

E.g.  
index_set = 1, 2, 3 ...
array[index_set] = random()
array = array[i] where i < 5 
rearranging
index_set = 1, 2, 3 ...
small_index_set =  i IN index_set, where i < 5
array[small_index_set] = random()
If the array[index_set] = assignment makes things real, this statement is impractical. Whereas array[small_index_set] = is finite sized.

Futures make this sort of manipulation feasible.

No comments: