On 7 November 2011 16:54, Bin Jin <[email protected]> wrote: > 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 [email protected] IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
