You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, fields are indexed using Strings (haskey(element, "flux")). For cases like this, using Symbols is usually better since Symbols are interned and therefore represented by their pointer. This means comparing symbols is just a pointer comparison and hashing them is faster than for strings. For example, the columns in a DataFrame are indexed using Symbols.
The text was updated successfully, but these errors were encountered:
We have had discussions about this subject a couple of times in Gitter. I think we generally agree it would be better to use symbols. We could still have things like update!(elements, "my data", 1.0) syntax for user-friendliness, and string is converted to a symbol.
Also, going towards more explicit syntax, maybe it would be good to have update_integration_points!, update_element!, update_problem!, update_analysis! and so on to make clear for which structure are fields going to be updated.
Currently, fields are indexed using
String
s (haskey(element, "flux")
). For cases like this, usingSymbol
s is usually better sinceSymbol
s are interned and therefore represented by their pointer. This means comparing symbols is just a pointer comparison and hashing them is faster than for strings. For example, the columns in aDataFrame
are indexed usingSymbol
s.The text was updated successfully, but these errors were encountered: