1
0
mirror of https://gitlab.com/xmpp-rs/xmpp-rs.git synced 2024-07-03 11:50:35 +02:00
Commit Graph

9 Commits

Author SHA1 Message Date
Emmanuel Gil Peyrot
6f304d197d jid: Optimise for no-transform JIDs
stringprep can make transformations to a JID, the most well-known one is
making the nodepart and domainpart lowercase but it does much more than
that.

It is extremely common to have to validate already-normalised JIDs
though, and since https://github.com/sfackler/rust-stringprep/pull/4
this is exactly what the stringprep crate does, by returning
Cow::Borrowed() for common ASCII-only cases.

This commit further reduces time spent by an additional -15%..-58% when
already using this stringprep improvement, in addition to the
89.5%..98.5% change brought by this improvement (and +1.3% total when
the JID isn’t normalised yet).

For instance, my own full JID parses in 1.83 µs before these changes,
132 ns with just the stringprep optimisation, and 46 ns with also this
commit, on an i7-8700K.
2023-07-16 19:50:12 +02:00
xmppftw
76b68e932a Update CHANGELOG for jid crate 2023-06-21 18:41:32 +02:00
xmppftw
2cafecb004 JID stringprep errors return a JidParseError instead of panic (#84) 2023-06-07 17:29:00 +02:00
xmppftw
8d9288ffd7 Implement From<&Jid> for String (close #69) 2023-05-28 22:27:40 +02:00
xmppftw
ce255d9602 Jid (de)serialization now uses untagged representation (close #66) 2023-05-28 19:54:51 +02:00
Emmanuel Gil Peyrot
10f173db91 jid: Release 0.9.3 2022-03-07 12:12:02 +01:00
Emmanuel Gil Peyrot
c94c95de0e jid: Release 0.9.2 2021-01-13 11:46:05 +01:00
Emmanuel Gil Peyrot
3e4b6b55c9 jid: Release 0.9.1 2021-01-13 00:33:26 +01:00
Emmanuel Gil Peyrot
714d850e69 Remove the -rs suffix of jid, minidom and xmpp
We know those are Rust libraries, no need to add it to the path.  This
synchronises their directory with the crate name, hopefully reducing
confusion.
2020-06-22 02:17:32 +02:00