darthdeus / comfy-benchmark

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Benchmarks for Comfy

Disclaimer: These benchmarks are not intended to be 100% accurate perfect representations of anything. They serve mainly as a sanity test for comparing Comfy to other things to make sure it's fast enough that nobody has to ever care about how fast it is.

This repo contains a few benchmarks for comfy, as well as the official bevymark for comparison. The goal is to include more useful benchmarks over time to make it easier to track regressions/improvements over time.

Note that bevy isn't really the target. There's other competition which is far ahead of anything in the Rust world, for example https://lemon07r.github.io/openfl-bunnymark/ and https://lemon07r.github.io/kha-html5-bunnymark/ which seem to be the fastest (around 150k on my iPhone and 300k on desktop at 60FPS).

Comfy does not aim to beat these, but we should still know how we compare. Being slow is one thing, not know how slow and why is another :)

Comfy is happy to make tradeoffs for ergonomics and safety, but we should do these in an informed way, and if there are free performance improvements we can do, they should be done.

Note on LTO

Note that the stress-test profile that bevy recommends includes lto="fat". I've tried the benchmark a few times with and without this option, and at least on my machine enabling LTO leads to the same performance (or maybe even ~1FPS worse).

Enabling this option causes the build to take 2.5 minutes longer, so considering I can't even see the performance impact it will remain disabled.

If someone wants to contribute a better solution for running these benchmarks or improve anything, I'm happy to accept PRs. But the point is not 100% scientific accuracy. Right now Bevy does around 120k sprites at around 50-55 FPS, while Comfy does around 35k sprites at ~50 FPS.

Running benchmarks

All these benchmarks assume Comfy is cloned into a sibling repository. While this is slightly inconvenient, it makes it much easier once you start tweaking things and want to see how it affects performance. Simply git clone https://github.com/darthdeus/comfy and put it in the right place and everything should work.

The bevymark uses the latest release of bevy.

Comfy bunnymark

make comfymark

Comfy bunnymark with Tracy enabled

make comfymark-tracy

Bevy bunnymark

make bevymark

Asset loading benchmark (WIP)

make asset-benchmark

Assets

Used texture is CC0 from https://cc0-textures.com/t/th-broken-wall

About


Languages

Language:Rust 94.7%Language:Makefile 3.8%Language:Shell 1.5%