Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shadowcasting benchmark #44557

Merged

Conversation

kevingranade
Copy link
Member

Summary

SUMMARY: None

Purpose of change

Better shadowcasting benchamark.

Describe the solution

Added an actual 3D noise benchmark, a benchmark on an open plain, and an open plain with sparse obstacles.

Describe alternatives you've considered

There are innumerable other scenes worth adding.

Testing

It is a test.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.) Code: Tests Measurement, self-control, statistics, balancing. labels Oct 2, 2020
std::array<const float ( * )[MAPSIZE *SEEX][MAPSIZE *SEEY], OVERMAP_LAYERS> &transparency_caches,
const int iterations )
{
float seen_squares[OVERMAP_LAYERS][MAPSIZE * SEEX][MAPSIZE * SEEY] = {{{0}}};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
float seen_squares[OVERMAP_LAYERS][MAPSIZE * SEEX][MAPSIZE * SEEY] = {{{0}}};
float seen_squares[OVERMAP_LAYERS][MAPSIZE * SEEX][MAPSIZE * SEEY] = {};

If it looks cleaner to you, you can just initialize these arrays like this and it should be equivalent (and maybe won't cause compiler complaints?).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far, I just hate the implicit-ness of it.

@ZhilkinSerg ZhilkinSerg merged commit 82beb80 into CleverRaven:master Oct 7, 2020
@kevingranade kevingranade deleted the shadowcasting-benchmark branch October 10, 2020 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.) Code: Tests Measurement, self-control, statistics, balancing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants