Subject: [UFL-dev] [HG UFL] - Improved hash code uniqueness by using

From: [email-masked] (UFL)
Date: Mon, 27 Oct 2008 14:44:26 +0100 (CET)

One or more new changesets pushed to the primary ufl repository.
A short summary of the last three changesets is included below.

changeset:   359:351b158783881034255e8ec2479e4ad54dec3689
tag:         tip
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Mon Oct 27 14:44:24 2008 +0100
files:       sandbox/basic_form_compiler.py ufl/base.py ufl/variable.py
description:
- Improved hash code uniqueness by using
  the types of two levels of operands.
  Is this good enough? Hash quality isn't
  really tested (don't know how to do that!)

- Further optimizations in __eq__, using types
  and operands inspection to avoid calls to repr.
  Worst case calls to "a == b" is still O(n) since
  the tree is traversed, but this should rarely happen.

changeset:   358:9559ced7496bd84132b17e601287ef4ed5fc8a0b
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Mon Oct 27 14:23:19 2008 +0100
files:       ufl/algebra.py ufl/finiteelement.py
description:
Optimization: Caching repr string for elements, sums and products.
Since repr is currently used for equality between expressions,
and its cost is O(size of expression tree), it can destroy the
order of some algorithms. This wasn't unexpected, but is starting
to show.

changeset:   357:68b6c8acad9df99261aeaee4bce336bf28a6940f
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Mon Oct 27 14:07:11 2008 +0100
files:       ufl/algorithms/transformations.py ufl/algorithms/variables.py
description:
Bugfixes.

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/ufl