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

prepare for vertex array usage #21

Merged
merged 3 commits into from
Feb 25, 2024
Merged

prepare for vertex array usage #21

merged 3 commits into from
Feb 25, 2024

Conversation

boubou19
Copy link
Member

No description provided.

Copy link

Warning: 2 uncommitted changes
#22

Co-authored-by: GitHub GTNH Actions <>
@@ -376,6 +376,24 @@ public static void addVerticesToTessellator(List<Vertex> vertices, Tessellator t
}
}

public static void addVerticesToTessellator(Vertex[] vertices, Tessellator tes) {
for (Vertex v : vertices) {

Choose a reason for hiding this comment

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

nit: If you're trying to reduce allocations use the c style iteration vs foreach which allocates an iterator

Copy link

@mitchej123 mitchej123 left a comment

Choose a reason for hiding this comment

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

adjust the for loop and seems fine

@boubou19 boubou19 merged commit 2e888e1 into master Feb 25, 2024
1 check passed
@boubou19 boubou19 deleted the less_ram_spam branch February 25, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants