I have a very naive question. I am playing around with binary quadratic forms and have a large array of values. I loop through a,b,c and, for each triple, compute some quantity that depends on a,b,c. Then, in the inner most c loop, I wish to increment value[d], where d=4ac-b^2, by that quantity.
I am finding that the step value[d]+= quantity; is taking way too long, presumably because, as c increments by 1, d=4ac-b^2, increments by a large amount, 4a, so the way that the array is read into the cache in chunks of consecutive array entries, is useless here. Is there a way in c or c++ to control what parts of an array get read into cache. For example can I ***efficiently*** read/manipulate equally spaced entries (spaced apart by 4a) of my value array into cache rather than the default consecutive entries. Any tips would be greatly appreciated. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---