mersenneforum.org Requests?
 Register FAQ Search Today's Posts Mark Forums Read

 2016-02-25, 20:51 #1 Xyzzy     "Mike" Aug 2002 1E8216 Posts Requests? We have some free time to work on the forum, so are there any requests? We cannot promise that requests will be implemented, but they will be looked into.
 2016-02-25, 23:20 #2 Mark Rose     "/X\(‘-‘)/X\" Jan 2013 2×31×47 Posts Factor the post counts! Last fiddled with by Mark Rose on 2016-02-25 at 23:20
2016-03-02, 16:17   #3
Xyzzy

"Mike"
Aug 2002

172028 Posts

Quote:
 Originally Posted by Mark Rose Factor the post counts!
We wrote a (really ugly) routine that does this but it is too server-intensive.

Because we don't store the results, each post is calculated over and over. Every post on the page generates a new shell_exec() call, which is just the beginning of our convoluted scheme.

Is there anything less taxing you'd like to see?

 2016-03-03, 13:49 #4 ramshanker     "Ram Shanker" May 2015 Delhi 37 Posts I hope the maximum post count hasn't exceeded 10k yet for any user on this forum? In that case you can just generate a pre-computed look-up table (array) php file with hard coded factors for all integers upto 10k. No need to make sys-call or anything, just attach that as header file. My 2 cents.
 2016-03-03, 14:00 #5 retina Undefined     "The unspeakable one" Jun 2006 My evil lair 5,879 Posts Make the year show as 4 digits. 15 Jan 14 is ambiguous, is it 2014 or 2015? Or was it when Jesus was a teenager?
 2016-03-03, 14:11 #6 bgbeuning   Dec 2014 22×32×7 Posts Some threads get very long. If someone points me to a thread with 200 pages I am not even going to try to find the interesting parts. What if each thread had a shared posting all pages of the thread displayed. The originator of the thread could put conclusions in the shared posting. For some threads, like "strategic double checks" the shared page could remind people to reserve the exponents they should work on. For the benchmark thread, the shared post could give the rules for the thread. Last fiddled with by bgbeuning on 2016-03-03 at 14:12
2016-03-03, 14:48   #7
Mark Rose

"/X\(‘-‘)/X\"
Jan 2013

2×31×47 Posts

Quote:
 Originally Posted by Xyzzy We wrote a (really ugly) routine that does this but it is too server-intensive. Because we don't store the results, each post is calculated over and over. Every post on the page generates a new shell_exec() call, which is just the beginning of our convoluted scheme. Is there anything less taxing you'd like to see?
I guess shell_exec("factor $postcount"); is a bit slow with all the process forks. I tested the performance: Code: <?php$loops = 1000;
$begin = microtime(true); for ($i = 0; $i <$loops; $i++) shell_exec("factor 12345");$time_taken = microtime(true) - $begin;$time_per_loop = $time_taken /$loops;
echo "It took $time_taken seconds to call factor$loops times. Time per loop was \$time_per_loop seconds.\n";
It took 1.2856957912445 seconds to call factor 1000 times. Time per loop was 0.0012856957912445 seconds.

1.3 ms per post count is a lot of overhead, I agree.

2016-03-03, 15:59   #8
Xyzzy

"Mike"
Aug 2002

2×5×11×71 Posts

Quote:
 Originally Posted by retina Make the year show as 4 digits.

2016-03-03, 16:01   #9
Xyzzy

"Mike"
Aug 2002

781010 Posts

Quote:
 Originally Posted by ramshanker In that case you can just generate a pre-computed look-up table (array) php file with hard coded factors for all integers upto 10k. No need to make sys-call or anything, just attach that as header file.
That is an interesting idea. Could you show us an example bit of code?

2016-03-03, 17:07   #10
axn

Jun 2003

Quote:
 Originally Posted by Xyzzy That is an interesting idea. Could you show us an example bit of code?
For numbers smaller than 10000, trial division is an entirely acceptable method of factoring. Are you saying you don't know how to do trial division in PHP?

2016-03-04, 01:51   #11
retina
Undefined

"The unspeakable one"
Jun 2006
My evil lair

10110111101112 Posts

Quote:
Originally Posted by Xyzzy
Quote:
 Originally Posted by retina Make the year show as 4 digits.

 Similar Threads Thread Thread Starter Forum Replies Last Post robert44444uk Prime Gap Searches 2 2017-01-17 07:57 WraithX FactorDB 32 2014-12-18 03:40 tului GPU Computing 15 2014-06-24 06:22 ixfd64 PrimeNet 44 2010-01-11 20:21 masser Sierpinski/Riesel Base 5 22 2007-09-24 21:05

All times are UTC. The time now is 17:04.

Sun Nov 29 17:04:45 UTC 2020 up 80 days, 14:15, 4 users, load averages: 0.80, 1.11, 1.06