mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2012-12-25, 23:15   #1
Sam Kennedy
 
Sam Kennedy's Avatar
 
Oct 2012

5216 Posts
Default Array vs Hash Table vs Map for QS

Currently I'm using two arrays for my quadratic sieve program. One to store the values of (x + sqrt(n)), and one which I add log2(p) to for sieving.

In c++ I've read that it's possible to use Hash Tables and Maps, although I have no experience with using them.

Would either provide a performance benefit over a standard array?
Sam Kennedy is offline   Reply With Quote
Old 2012-12-25, 23:25   #2
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

143538 Posts
Default

Quote:
Originally Posted by Sam Kennedy View Post
Currently I'm using two arrays for my quadratic sieve program. One to store the values of (x + sqrt(n)), and one which I add log2(p) to for sieving.

In c++ I've read that it's possible to use Hash Tables and Maps, although I have no experience with using them.

Would either provide a performance benefit over a standard array?
No, both would provide an enormous performance penalty
fivemack is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to init an array in Posix bc? ewmayer Linux 29 2018-03-08 21:42
FNV hash challenges Rich Puzzles 2 2011-12-23 18:17
Pari hash table lookup Joshua2 Software 5 2009-02-23 22:59
array of bits Citrix Programming 2 2005-08-21 20:06
Ubasic Array question rn0dal Programming 6 2004-09-15 14:57

All times are UTC. The time now is 22:06.

Sun Jan 24 22:06:17 UTC 2021 up 52 days, 18:17, 0 users, load averages: 1.61, 1.76, 1.77

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.