
7 Nov
2011
7 Nov
'11
1:27 a.m.
On 7 November 2011 16:54, Bin Jin
The actual time to calculate p2num and montgKeys are both O(log P). What I'm looking is a constant time lookup.
Are these two functions CPU bottlenecks as revealed by profiling? If not, then you're probably over-optimising. Note that if O(1) lookup is really required, then that implies you use a static array, which requires you to pre-populate such an array with all possible values. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com