Re: [sage-devel] Fwd: [ODK participants] Blog post on fast multivariate arithmetic

2017-07-12 Thread Francesco Biscani
In the benchmarks I use the C++ interfaces of FLINT and
Boost.Multiprecision only for ease of initialization/destruction. The bulk
of the operations is performed using directly the C API of FLINT and GMP.
mp++ itself has some moderate template metaprogramming in place, but for
instance it is currently lacking expression templates support (unlike
fmpzxx), the focus at the moment being on fast low-level primitives
(add/sub/mul/addmul etc.).

Cheers,

  Francesco.

On 12 July 2017 at 15:13, 'Bill Hart' via sage-devel <
sage-devel@googlegroups.com> wrote:

> Beware, Bernard Parisse has just helped me track down why the Flint
> timings for the sparse division only benchmark looked so ridiculously low.
> It turns out that due to an accident of interfacing between Nemo and Flint,
> it was using reflected lexicographical ordering instead of true
> lexicographical ordering. If I had labelled them "exact division", instead
> of "quotient only" and not included the x^(n - 3) term in the benchmark
> itself, the timings could be considered correct (though Giac would also
> have been able to do the computation much faster in that case). But
> unfortunately, this discovery means I had to change the timings for Flint
> for that benchmark. It is now correct on the blog.
>
> The timings for mppp are really good. I'm surprised you beat the Flint
> timings there, since we use pretty sophisticated templating in our C++
> interface. But clearly there are tricks we missed!
>
> Bill.
>
> On Wednesday, 12 July 2017 12:16:33 UTC+2, bluescarni wrote:
>>
>> Interesting timings, they give me some motivation to revisit the dense
>> multiplication algorithm in piranha :)
>>
>> As an aside (and apologies if this is a slight thread hijack?), I have
>> been spending some time in the last few weeks decoupling the multiprecision
>> arithmetic bits from piranha into its own project, called mp++:
>>
>> https://github.com/bluescarni/mppp
>>
>> So far I have extracted the integer and rational classes, and currently
>> working on the real class (arbitrary precision FP).
>>
>> Cheers,
>>
>>   Francesco.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Fwd: [ODK participants] Blog post on fast multivariate arithmetic

2017-07-12 Thread 'Bill Hart' via sage-devel
Beware, Bernard Parisse has just helped me track down why the Flint timings 
for the sparse division only benchmark looked so ridiculously low. It turns 
out that due to an accident of interfacing between Nemo and Flint, it was 
using reflected lexicographical ordering instead of true lexicographical 
ordering. If I had labelled them "exact division", instead of "quotient 
only" and not included the x^(n - 3) term in the benchmark itself, the 
timings could be considered correct (though Giac would also have been able 
to do the computation much faster in that case). But unfortunately, this 
discovery means I had to change the timings for Flint for that benchmark. 
It is now correct on the blog.

The timings for mppp are really good. I'm surprised you beat the Flint 
timings there, since we use pretty sophisticated templating in our C++ 
interface. But clearly there are tricks we missed!

Bill. 

On Wednesday, 12 July 2017 12:16:33 UTC+2, bluescarni wrote:
>
> Interesting timings, they give me some motivation to revisit the dense 
> multiplication algorithm in piranha :)
>
> As an aside (and apologies if this is a slight thread hijack?), I have 
> been spending some time in the last few weeks decoupling the multiprecision 
> arithmetic bits from piranha into its own project, called mp++:
>
> https://github.com/bluescarni/mppp
>
> So far I have extracted the integer and rational classes, and currently 
> working on the real class (arbitrary precision FP).
>
> Cheers,
>
>   Francesco.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Fwd: [ODK participants] Blog post on fast multivariate arithmetic

2017-07-12 Thread Francesco Biscani
Interesting timings, they give me some motivation to revisit the dense
multiplication algorithm in piranha :)

As an aside (and apologies if this is a slight thread hijack?), I have been
spending some time in the last few weeks decoupling the multiprecision
arithmetic bits from piranha into its own project, called mp++:

https://github.com/bluescarni/mppp

So far I have extracted the integer and rational classes, and currently
working on the real class (arbitrary precision FP).

Cheers,

  Francesco.

On 9 July 2017 at 17:39, William Stein  wrote:

> New blog post from Bill Hart.  It includes a section claiming Sage’s
> multivariate polynomial arithmetic speed is much worse than expected...
>
> -- Forwarded message -
> From: Bill Hart 
> Date: Sun, Jul 9, 2017 at 8:34 AM
> Subject: [ODK participants] Blog post on fast multivariate arithmetic
> To: Opendreamkit participants 
>
>
> Dear all,
>
> I've written a blog post on the fast multivariate arithmetic we've been
> doing for ODK [1]. This is a deliverable which is due at the end of the
> four years, so we've got a long way to go, but it is progressing nicely in
> the interim.
>
> The next stage is to parallelise this, and we've hired Daniel Schultz to
> work on our ODK deliverable which will do precisely this. He's an
> experienced developer from the US who was already writing his own CAS (in
> assembly language, believe it or not!)
>
> Bill.
>
> [1] https://wbhart.blogspot.de/2017/07/update-on-fast-
> multivariate-polynomial.html
> --
> -- William Stein
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Question on git merge

2017-07-12 Thread Simon King
Hi Nils,

On 2017-07-12, Nils Bruin  wrote:
> On Wednesday, July 12, 2017 at 8:46:00 AM UTC+2, Simon King wrote:
>>
>> Actually I still miss the old sage development workflow with mercurial. 
>
> Are you sure? It led to some precious losses of code:
>  
> https://trac.sagemath.org/ticket/13447#comment:84 

I normally prefer rare big desasters over daily small desasters.
But that's maybe just me.

Cheers,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Question on git merge

2017-07-12 Thread Nils Bruin
On Wednesday, July 12, 2017 at 8:46:00 AM UTC+2, Simon King wrote:
>
> Actually I still miss the old sage development workflow with mercurial. 
>
> Are you sure? It led to some precious losses of code:
 
https://trac.sagemath.org/ticket/13447#comment:84 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Question on git merge

2017-07-12 Thread Dima Pasechnik
a very useful option is to cherry-pick but not commit:

git cherry-pick -n

after this you can undo changes made by cherry-pick (by git reset --  
or otherwise)
then doing "git add -p ..." --- which is more robust than editing patches, 
and then 
commit the result.


Well, yes, our old patch-quilt way was very "forgiving" way to code, for me 
resulted in large changes on several tickets totally lost, as  it was not 
possible to recover the state of the source tree to which made patches 
applied...
And nobody knows how many bugs got introduces by the lack of control of the 
base for the patches to be applied...

 





On Wednesday, July 12, 2017 at 6:31:10 AM UTC+1, Ralf Stephan wrote:
>
> Just to emphasize that there are different ways to work with patches, I am 
> using patchfiles exclusively, always piping the diff into a text file and 
> editing that. It's quite easy, just don't change hunk headers.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Question on git merge

2017-07-12 Thread Erik Bray
On Tue, Jul 11, 2017 at 6:13 PM, Simon King  wrote:
> Hi Erik,
>
> On 2017-07-11, Erik Bray  wrote:
>> cherry-pick basically does exactly that.  If a patch doesn't apply
>> with cherry-pick it will give you the opportunity to resolve the merge
>> conflict manually, which you'll probably have to do no matter what in
>> most cases.
>
> Sure. The point is that with my previous git settings, I had to resolve
> literally hundreds of what git considered to be conflicts, even though
> the commit that I wanted to cherry-pick touched just a single line.
>
> However, in discussion with Travis on trac, it has turned out that using
> a different mergetool (here: kdiff3 instead of meld) can improve the 
> situation.
> Namely, when I wanted to cherry-pick commit xyz from branch A into branch B,
> then meld used A as starting point of the manual merge, not B. Thus, I
> had to reconstruct all the hundreds of changes leading from A to B, plus the
> small changeset.

Weird. I've never had something like that happen though I guess
obviously it can.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.