Richard in Reading on Wed, 01 May 2013 19:05:24 +0200
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Recovering partial factorizations when using trap() and alarm() to abort factorint()
- To: Max Alekseyev <firstname.lastname@example.org>
- Subject: Re: Recovering partial factorizations when using trap() and alarm() to abort factorint()
- From: Richard in Reading <email@example.com>
- Date: Wed, 1 May 2013 18:05:10 +0100 (BST)
- Cc: firstname.lastname@example.org
- Delivery-date: Wed, 01 May 2013 19:05:24 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1367427910; bh=tlBGfQvIuV4NJiGKkVigTnDbwkPmKyRQDGz/KkkLoE4=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=D9wA2brwnQnS1Dgg+PY/7sWX9YUSrPm6wbC4rOSB90DuiFeRzlGBJEZ/ogoVXCEwHR7NiBlP1e5cYwvh8tzFRsCQUkL5RWePS1DQnSunlOtjhjSE2oop2lXf4wGmOKE+tGaLGwbqq0mA24Nm6tmDqwKNhLmBNlDTy8e6iTvX47o=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Y/iukXUz0vOX1JRaqFKZsVspE6PizlbTl3jsvCHOFk8mAd86F7tfgW5d2uW53sTB609bUSq+9hq+XypB5CeZU7kPykIbfzIojhh+5i6hMLBj22uH0kjWPmnpeytRXa69gAH1wv0P1Law2RdWhdxyloYt2Bx6b9qKRyFYl8JJauI=;
- In-reply-to: <CAJkPp5MHw8CUP3xTKHORG_jQBSjU+MJ1hvfEqbOqtRvGjEgHGg@mail.gmail.com>
Thanks again Max!
I saw that this was part of the code you posted but I didn't try it as I thought it was doing something completely different. If you're doing lots of factoring then factor(N,0) will presumably slow down a lot as the list of stored factors grows... I think I'm catching on to the way things are done round here... I presume if I change primelimit then the stored factors are forgotten and the memory is freed?
--- On Wed, 1/5/13, Max Alekseyev <email@example.com> wrote:
> This is done by setting default(factor_add_primes,1);
> before running factorint(N) and calling factor(N,0); after it is aborted.