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
this repeats a ton of work and calls a bunch of O(n*log n) functions. it also takes a Map as an argument, despite the fact that it just ends up turning it into a Bimap, which can lead to some confusion as Bimap will delete nonunique keys / values. if you write the function like this instead:
you eliminate a tremendous amount of work, at the expense of the "value" attribute not being the index.
if it is important that the value attribute stay the index, it would be trivial to just zip the index with one of the keys.
alternatively, instead of taking in a Bimap, it would also be possible to take some indexed data structure like a Set of pairs or something, but that would require an alternative to the listWithKey function to be written.
as long as this isn't controversial, it would be trivial for me to change this to taste and pr my changes
The text was updated successfully, but these errors were encountered:
the dropdown function is currently implemented like this
this repeats a ton of work and calls a bunch of O(n*log n) functions. it also takes a Map as an argument, despite the fact that it just ends up turning it into a Bimap, which can lead to some confusion as Bimap will delete nonunique keys / values. if you write the function like this instead:
you eliminate a tremendous amount of work, at the expense of the "value" attribute not being the index.
if it is important that the value attribute stay the index, it would be trivial to just zip the index with one of the keys.
alternatively, instead of taking in a
Bimap
, it would also be possible to take some indexed data structure like a Set of pairs or something, but that would require an alternative to thelistWithKey
function to be written.as long as this isn't controversial, it would be trivial for me to change this to taste and pr my changes
The text was updated successfully, but these errors were encountered: