| Crates.io | temporenc |
| lib.rs | temporenc |
| version | 0.0.3 |
| created_at | 2017-01-29 04:03:18.216239+00 |
| updated_at | 2017-02-07 17:58:09.18214+00 |
| description | Library for the Temporenc time/date format. |
| homepage | https://github.com/temporenc/temporenc-rust |
| repository | https://github.com/temporenc/temporenc-rust |
| max_upload_size | |
| id | 8280 |
| size | 101,860 |
Rust library for Temporenc, a binary date/time format.
Great performance is a high priority for this implementation. It uses a different struct for each of the temporal types (date, date and time, etc). This allows for hand-tuned serialization and deserialization logic for each type. There also is no heap allocation (aside from test code, of course).
See below for some sample performance numbers from an i7-6850K (a 3.6Ghz Broadwell-E chip). Batches of 100 are used because time measurement accuracy is poor when single operations only take a few nanoseconds.
| Operation | Quantity | Type | Time |
|---|---|---|---|
| Deserialize | 100 | random date | 665ns |
| Deserialize | 100 | random date + time | 985ns |
| Deserialize | 100 | random date + time + offset | 974ns |
| Deserialize | 100 | random date + time + subsecond | 1300ns |
| Deserialize | 100 | random date + time + subsecond + offset | 1473ns |
| Deserialize | 100 | random time | 801ns |
| Serialize | 100 | random date | 288ns |
| Serialize | 100 | random date + time | 435ns |
| Serialize | 100 | random date + time + offset | 492ns |
| Serialize | 100 | random date + time + subsecond | 897ns |
| Serialize | 100 | random date + time + subsecond + offset | 982ns |
| Serialize | 100 | random time | 277ns |