Add trivial shortcuts in expair plumbing of class add.
authorRichard Kreckel <kreckel@ginac.de>
Sat, 7 Nov 2015 00:50:00 +0000 (01:50 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Sat, 7 Nov 2015 00:50:00 +0000 (01:50 +0100)
commit9cd8ed658fbc4b8c50b40e1db770462526dfb806
tree58ef8a86b4b26ff7792118c68588a26c12ca0b96
parent345f0c93051c01cdb5ab879b57f70118978fa9d0
Add trivial shortcuts in expair plumbing of class add.

These little shortcuts in add::split_ex_to_pair(ex) and in
add::combine_ex_with_coeff_to_pair(ex, ex) avoid the creation of
new ex objects. These pieces of code are executed so often that this
patch speeds up GiNaC by 5-10%, depending on test.
ginac/add.cpp