pablosanjose / Elsa.jl

Efficient lattice simulation algorithms - a Julia library
Other
18 stars 2 forks source link

Produce missing mask when appropriate #26

Closed pablosanjose closed 5 years ago

pablosanjose commented 5 years ago

Optimization to avoid allocating a supercell site mask when it is all true. This includes a runtime check for the cases where it is not evident from the type of supercell inputs. As a result supercell is no longer type-stable. However, this instability allows unitcell to become faster while remaining type-stable, because it no longer has to check mask to build the list of sites.