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 is more of a comment for something to keep in mind in future work, rather than an issue about something that exists now in the code. I mention it now because this potential issue is easier to prevent than to correct afterwards =)
I noticed that in the internal representation for Slist, the size comes after the list itself. This is fine, there's nothing wrong with this in principle. However, when the time comes to implement serializations for values of type Slist x, such as Binary or Serialize or Serialise or ToJSON or whatever, if the serialized representations include the size of the list, please make sure the size comes before the list content, and not after. This can make parsing significantly more performant, since the expected length can be verified before even attempting to parse the entirety of the list.
Cool library!
The text was updated successfully, but these errors were encountered:
That is an interesting point! To be honest I didn't think about that..
I don't mind having the arguments swapped in the library if it could help in the future 🙂
This is more of a comment for something to keep in mind in future work, rather than an issue about something that exists now in the code. I mention it now because this potential issue is easier to prevent than to correct afterwards =)
I noticed that in the internal representation for
Slist
, the size comes after the list itself. This is fine, there's nothing wrong with this in principle. However, when the time comes to implement serializations for values of typeSlist x
, such asBinary
orSerialize
orSerialise
orToJSON
or whatever, if the serialized representations include the size of the list, please make sure the size comes before the list content, and not after. This can make parsing significantly more performant, since the expected length can be verified before even attempting to parse the entirety of the list.Cool library!
The text was updated successfully, but these errors were encountered: