Comments (5)
Recent benchmarks:
https://david.kolo.ski/rust_serialization_benchmark/
https://www.reddit.com/r/rust/comments/13hwwhj/bitcode_04_release_binary_serialization_format/
This seems like it would be worth it now.
from gamercade_console.
Interestingly I ran a test with this on the 3d example and somehow came up with a bigger file:
- bincode + zstd: 143kb
- bitcode raw: 443kb
- bitcode + zstd: 168kb
from gamercade_console.
Closing this for now, seems unnecessary to continue exploring this at this point
from gamercade_console.
bitcode author here, your test on Feb 4 was with an old version of bitcode (presumably 0.4 or 0.5). These old versions didn't compress very well because they serialized bits while compression like zstd operates on bytes. Luckily I have released a new version bitcode = "0.6"
which compresses much better.
Using version 3de7156db381dd2fa1943d59551360819e3e27f7
because the latest version failed to deserialize, I ran some tests on example_3d.gcrom
. I initially measured a small regression from bincode 160kb -> 164kb. However, after further investigation I managed to get an improvement to 115kb with a small code change.
I replaced
gamercade_console/gamercade_core/src/graphics/color.rs
Lines 20 to 54 in 31bec15
with #[derive(Serialize, Deserialize)]
which serializes the color as (u8, u8, u8, u8) instead of u32. This allows bitcode to leverage its improved compression (but has no effect on bincode). Assuming you want to keep the human readable representation, I recommend using (self.r, self.g, self.b, self.a).serialize(serializer)
to achieve the same effect.
from gamercade_console.
Thanks for looking into this. Going to re-open the issue as it will be worth it to look into it again in the future!
from gamercade_console.
Related Issues (20)
- MacOs file has no extension
- Incorporate input_delay settings for p2p sessions HOT 1
- Add additional aspect ratios & resolutions HOT 5
- DATA PACKS: WASM Linear Memory, Rollback & Console Constraints HOT 2
- Gauging Interest in: Parallel Compute Instruction Set, Vector Processing Unit, or GPU-lite interface. HOT 1
- Audio Engine: Support playback for other formats HOT 1
- Import Sprite Sheet: Make removal of empty sprites optional HOT 1
- RetroArch Core
- Gamercade-Mac binaries aren't executable by default. HOT 1
- ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave HOT 7
- Detect Desyncs
- Support >2 Total Network Connections HOT 1
- Support for Mouse & Mouse Api HOT 2
- Determine Max Game Rom Size HOT 3
- Add `write_pixel_buffer` type of graphics function
- Console Web Support HOT 2
- Allow Opening of `.wasm` files with default assets. HOT 1
- `gamercade_rs` Crate 0.1.2 is a Breaking Release, But Not Marked As Such HOT 1
- importing a palette should order colors from left to right, and top to bottom
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gamercade_console.