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:56:12 +0000 (01:56 +0100)
commitbcd95dd63ac2499ee50a416c56ce200cd63521a8
tree476d4aca6964093319af6142e1f2a7a2ba75b004
parentaa722555bcb6f44365d1b653c720a91f8c7225e4
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