mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Forum Feedback (https://www.mersenneforum.org/forumdisplay.php?f=61)
-   -   Requests? (https://www.mersenneforum.org/showthread.php?t=21033)

Xyzzy 2016-02-25 20:51

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.

:mike:

Mark Rose 2016-02-25 23:20

Factor the post counts!

:ttu:

Xyzzy 2016-03-02 16:17

[QUOTE=Mark Rose;427438]Factor the post counts![/QUOTE]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?

:mike:

ramshanker 2016-03-03 13:49

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. :smile:

retina 2016-03-03 14:00

Make the year show as 4 digits.

15 Jan 14 is ambiguous, is it 2014 or 2015? [size=1]Or was it when Jesus was a teenager?[/size]

bgbeuning 2016-03-03 14:11

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.

Mark Rose 2016-03-03 14:48

[QUOTE=Xyzzy;427929]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?

:mike:[/QUOTE]

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";[/code]

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.

Xyzzy 2016-03-03 15:59

[QUOTE=retina;428011]Make the year show as 4 digits.[/QUOTE]:tu:

Xyzzy 2016-03-03 16:01

[QUOTE=ramshanker;428009]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.[/QUOTE]That is an interesting idea. Could you show us an example bit of code?

:mike:

axn 2016-03-03 17:07

[QUOTE=Xyzzy;428025]That is an interesting idea. Could you show us an example bit of code?

:mike:[/QUOTE]

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?

retina 2016-03-04 01:51

[QUOTE=Xyzzy;428024][QUOTE=retina;428011]Make the year show as 4 digits.[/QUOTE]:tu:[/QUOTE]:retina:


All times are UTC. The time now is 13:31.

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