eve-java | Java implementation of Eve , a multipurpose , web | SDK library
kandi X-RAY | eve-java Summary
kandi X-RAY | eve-java Summary
EVE - JAVA implementation. Eve is a multipurpose, web based agent platform. The project aims to develop an open protocol for communication between software agents. Eve is designed as a decentral, scalable system for autonomously acting agents. Eve uses the existing world wide web as platform, and uses existing protocols for data exchange (HTTP) and for messaging (JSON-RPC). This project contains the Java implementation of Eve. Please refer to the documentation for other implementations. Documentation is available on
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Iterate over a single value
- Casts one or more parameters
- Scan threads .
- Get the lights .
- Creates a new instance of the class mapper .
- Handles a GET request .
- Handle incoming messages .
- Calculate the cycle state .
- Alert alert about the lightitudes of the left and right nodes .
- Subscribe to Pubnub .
eve-java Key Features
eve-java Examples and Code Snippets
Community Discussions
Trending Discussions on eve-java
QUESTION
In the quadratic sieve algorithm, after finding bSmooth values using logarithmic approximation you need to factor the number, let's call it B
, to construct the bSmooth vector.
A common solution is to use a trial division using the primes in the factor base. Unlike random numbers, in this case, the trial division is super efficient since most of the factors will be in the prime base. I am saying "most" because a common optimization will allow a small threshold to include 1-3 prims with a product of up to 2^30 or so, it's called a partial relation.
In my current implementation, this vector extraction phase takes most of the time. Another solution that I have been trying to do is receiving, walking again over the prime base, and record the vectors in the indexes knowen to be b-smooth., but that turned to be even slower.
Below is my current code, I added 4 optimizations for the trial division, please tell me if there are better solutions for it.
- For the prime 2, I check the last set bit of
B
and shift right to extract it. - I am using BigInteger
divideAndRemainder
it's optimizing both the memory and the performance by combining the division and the mod actions into 1 - if
B
is smaller then the max prime in the factor base, then it must be in the factor base, so I use a hash map to locate it's index - if no prime up to
B.bitLenght() / 2
is dividingB
then it must be a partial relation, I will include it only if it's a prime.
ANSWER
Answered 2020-Aug-28 at 17:55I was able to achieve a nearly 80% boost in performance by switching the trial division with receiving. Now, I already mentioned in the question that I tried this before with no success. Well, this time it worked.
I replaced the BigInteger.mod(x).equals(ZERO)
test with integer operations (bSmoothData.localX - delta) % prime == startingPosition
, it's probably very specific to my implemintation, but the idea is to check if the prime is supposed to divide the bSmooth index in the sieving array.
Next, I construct a product of all those primes and divide the actual bSmooth value by it, I left then with a reminder that can feet into Java long. And I continue extracting it using trial division. If you are interested in my implementation I made a video about it here
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install eve-java
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page