Skip to content

cgen: optimize literal string comparison (string__eq -> vmemcmp)#22614

Merged
spytheman merged 13 commits intovlang:masterfrom
felipensp:opt_literal_compare
Oct 23, 2024
Merged

cgen: optimize literal string comparison (string__eq -> vmemcmp)#22614
spytheman merged 13 commits intovlang:masterfrom
felipensp:opt_literal_compare

Conversation

@felipensp
Copy link
Copy Markdown
Member

@felipensp felipensp commented Oct 21, 2024

This PR makes literal string comparison == and != to generate _SLIT_EQ and _SLIT_NE macro usage instead of string__eq.

image

image

Huly®: V_0.6-21063

@felipensp felipensp marked this pull request as ready for review October 22, 2024 14:05
Comment thread vlib/v/gen/c/infix.v Outdated
Comment thread vlib/v/gen/c/cheaders.v Outdated
Copy link
Copy Markdown
Contributor

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Excellent work.

Comment thread vlib/v/gen/c/cheaders.v Outdated
@spytheman spytheman merged commit 9dc1a99 into vlang:master Oct 23, 2024
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