mirror of
https://github.com/azalea-rs/simdnbt.git
synced 2025-08-02 07:26:04 +00:00
add some inlines for writing
This commit is contained in:
parent
bfb721890d
commit
39b68ea725
2 changed files with 3 additions and 2 deletions
|
@ -90,9 +90,9 @@ And for writing `complex_player.dat`:
|
||||||
|
|
||||||
| Library | Throughput |
|
| Library | Throughput |
|
||||||
| --------------- | ------------ |
|
| --------------- | ------------ |
|
||||||
| simdnbt::borrow | 2.4670 GiB/s |
|
| simdnbt::borrow | 2.6116 GiB/s |
|
||||||
|
| simdnbt::owned | 2.5033 GiB/s |
|
||||||
| azalea_nbt | 2.4152 GiB/s |
|
| azalea_nbt | 2.4152 GiB/s |
|
||||||
| simdnbt::owned | 1.9660 GiB/s |
|
|
||||||
| graphite_binary | 1.8804 GiB/s |
|
| graphite_binary | 1.8804 GiB/s |
|
||||||
|
|
||||||
The tables above were made from the [compare benchmark](https://github.com/azalea-rs/simdnbt/tree/master/simdnbt/benches) in this repo.
|
The tables above were made from the [compare benchmark](https://github.com/azalea-rs/simdnbt/tree/master/simdnbt/benches) in this repo.
|
||||||
|
|
|
@ -279,6 +279,7 @@ impl NbtTag {
|
||||||
///
|
///
|
||||||
/// This function is unsafe because it doesn't check that there's enough space in the data.
|
/// This function is unsafe because it doesn't check that there's enough space in the data.
|
||||||
/// 4 bytes MUST be reserved before calling this function.
|
/// 4 bytes MUST be reserved before calling this function.
|
||||||
|
#[inline]
|
||||||
unsafe fn unchecked_write_without_tag_type(&self, data: &mut Vec<u8>) {
|
unsafe fn unchecked_write_without_tag_type(&self, data: &mut Vec<u8>) {
|
||||||
match self {
|
match self {
|
||||||
NbtTag::Byte(byte) => unsafe {
|
NbtTag::Byte(byte) => unsafe {
|
||||||
|
|
Loading…
Add table
Reference in a new issue