mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2023-02-21, 01:44   #12
mrh
 
"mrh"
Oct 2018
Temecula, ca

24·32 Posts
Default

I know you said RDBMS, but just in case you are interested... If you happen to be using golang, BadgerDB is impressive if you just need key/value pairs. I've also used AWS DynamoDB a number of times when I didn't want to worry about where to put the data. I found it easy to use.
mrh is offline   Reply With Quote
Old 2023-02-21, 18:49   #13
Tyler Busby
 
Tyler Busby's Avatar
 
Jan 2023

6210 Posts
Default

Quote:
Originally Posted by mrh View Post
I know you said RDBMS, but just in case you are interested... If you happen to be using golang, BadgerDB is impressive if you just need key/value pairs. I've also used AWS DynamoDB a number of times when I didn't want to worry about where to put the data. I found it easy to use.
Thanks for the recommendation! I'm more of a python guy, but I'm glad to hear all recs regardless. As I hadn't heard of DynamoDB or BadgerDB until now.


I've managed to whip up a little sqlite schema along with some python scripts to manage it, just to prototype and see what works well and what doesn't. For the time being, pickling gmpy2 mpz objects and storing those in a unique blob column for values worked basically seamlessly. Just have to store num_digits and a separate unique PK as well, and most queries won't be too painful.

Moreso than anything, the parser/expression evaluator ended up being the more difficult piece of the puzzle (when trying to machine parse the wiki page of sequences needing factors), but after accidentally trying to calculate 2^50331648+1 a few times and running out of memory, I have a moderately fault tolerant parser for that page :^)

Converting ecm efforts of the form <curves>@<B1> into a t-level that can be passed to yafu was another difficult problem, I basically converted WraithX's ecmprobs javascript into python exactly and used that. Although come to think of it, yafu probably has some version of this transformation embedded in it I could've extracted.

The next piece is to determine the next "least work" composite to factor for, say, 5 t-levels. i.e. given many composites and associated t levels of ecm effort, which one will have the fastest completion of the next 5 t-levels?

For example, say you have these composites and ecm work done (and no other info) and want to find a factor as soon as possible:
Code:
C289    t30
C180    t35
C150    t40
C500    t20
C1239   t5
It doesn't seem easy to know best how to distribute your efforts. The heuristic I keep returning to is: only work on composites less than some size, probably cutoff around 300-500. Then work on the composite with the lowest existing work level. But once they all get to about t30-40, I'd think this would start to break down as the larger composites would take much longer than the smaller ones.

I think this could be solved with math used for WraithX's ecmprob's bottom graph, but that seems a little bit harder to translate into python, just because there's much more data. If I finish doing that, I think it might be worthwhile to create and release ecmprobs.py that can calculate useful transformations relating to ecm work, like [(curves,b1)]->t_level; (digits, t_level_diff, threads)->completion_time; as ecmprobs seems to be the only place you can directly access these types of non-trivial calculations right now.
Tyler Busby is offline   Reply With Quote
Old 2023-02-21, 19:41   #14
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

1137410 Posts
Default

Quote:
Originally Posted by Tyler Busby View Post
Thanks for the recommendation! I'm more of a python guy...
As are most. I won't hire anyone who can't work with low-level C.
chalsall is offline   Reply With Quote
Old 2023-02-21, 20:40   #15
Tyler Busby
 
Tyler Busby's Avatar
 
Jan 2023

2×31 Posts
Default

Quote:
Originally Posted by chalsall View Post
As are most. I won't hire anyone who can't work with low-level C.
C certainly has its place! I've been meaning to get back to writing more C for performance dependent/system level stuff (or maybe learn rust). But it's tough to beat python when you want to haphazardly tape together various executables/C bindings modules for fun like a mad scientist

I just mention preferring Python over Go as they occupy the same programming language stratum in my mind (although I'm sure some might object to that). Not that I'm only capable of programming in Python.

But Python's generators/coroutines mixed with modules like gmpy2/primesieve/numpy/sympy really make it feel like you can get 80% of the way to the performance of a super optimized C program with 20% of the effort. And I just haven't really felt the need to squeeze out the last bit of performance by switching to C for any specific subproblem. And when I do, it's usually already been written by someone in a program that's used widely here.

Last fiddled with by Tyler Busby on 2023-02-21 at 20:46
Tyler Busby is offline   Reply With Quote
Old 2023-02-21, 20:50   #16
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

2×112×47 Posts
Default

Quote:
Originally Posted by Tyler Busby View Post
C certainly has its place.
Yes. As does handcrafted asm..

Last fiddled with by chalsall on 2023-02-21 at 20:52 Reason: Stupid human... Couldn't even get the text encoding correct. Sucks to be me... 9^)
chalsall is offline   Reply With Quote
Old 2023-02-22, 05:43   #17
mrh
 
"mrh"
Oct 2018
Temecula, ca

24·32 Posts
Default

Quote:
Originally Posted by chalsall View Post
Yes. As does handcrafted asm..
I'm and old school asm/C person, started in the PDP-11 days. Recently took up using go, and quite enjoyed it. And I'm pretty grumpy...

Last fiddled with by mrh on 2023-02-22 at 05:43
mrh is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
This is a sequence with integers MattcAnderson MattcAnderson 23 2021-04-19 18:19
large equation system over integers talork Other Mathematical Topics 26 2011-03-29 19:33
Integers in a grid Unregistered Homework Help 1 2010-05-06 20:09
Given a set of R integers... Joshua2 Puzzles 19 2009-11-08 00:36
2n+1 Integers davar55 Puzzles 8 2007-06-06 13:24

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


Fri Jul 7 13:59:28 UTC 2023 up 323 days, 11:28, 0 users, load averages: 1.16, 1.18, 1.17

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, 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.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔