On Sat, Jan 13, 2018 at 12:59 AM, Waldek Hebisch <[email protected]> wrote: > oldk1331 wrote: >> >> https://github.com/oldk1331/fricas/commit/1b4af9795519918465253e5628b3d33c75e92abd >> >> This is almost a rewrite of List, I make 4-space indentation >> and make code style consistent. >> >> Some notes: >> 1. QCAR/QCDR is actually slower than CAR/CDR. I compared them >> in SBCL using 'disassemble'. > > I doubt if this comparison is relevant. Namely, QCAR/QCDR differ > from CAR/CDR by presence of declarations. sbcl documentation > clearly states that _at default safety setting_ declarations > are checked. This means that in default setting QCAR/QCDR > _alone_ is indeed slower. However: > > - CAR/CDR gain speed due to weaker checking -- we can gain > more speed by skipping more checks, that is using 'safety 0' > At 'safety 0' sbcl blindly trusts declarations, so we get > more speed from QCAR/QCDR > - even with extra checks on average we gain: we pay cost of checks > in some places but then sbcl can infer types in other places > and _safely_ optimize object code > > -- > Waldek Hebisch >
I can agree with you on this one. The following patch is a slightly improved patch over 1b4af9. https://github.com/oldk1331/fricas/commit/911f095bcf47d9b8463374f4ce97473e0eb652e0.patch You should apply this patch after the "don't apply ill-formed inline optimization" patch. And with your QCAR/QCDR changes. -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
