bevyengine / bevyengine/bevy

Use u64 for change ticks

Open
#15,683 4 comments 0 reactions 0 assignees View on GitHub
A-ECS C-Feature C-Performance D-Modest S-Adopt-Me S-Blocked S-Needs-Benchmarking
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

> [!NOTE]
> Tracking issue for closed 2022 PR #6327 (alternate approach: #6651)
> Original author: `zakarumych`

## What problem does this solve or what need does it fill?

Avoids the complexity (and runtime perf overhead) of our current looping u32 implementation, at the cost of higher memory usage.

Implementation blocked on configurable change detection.

## What solution would you like?

Replace `u32` with `u64` for tick values. Maintenance code to guard against overflow should be removed.

Downside - requires `AtomicU64`.
A workaround should be implemented for when `AtomicU64` is not available on target platform.

## What alternative(s) have you considered?

See #6651 for context.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.