Skip to content

builtin: string test refactor, string functions inlining#17598

Merged
spytheman merged 2 commits intovlang:masterfrom
ChAoSUnItY:string_refactor
Mar 11, 2023
Merged

builtin: string test refactor, string functions inlining#17598
spytheman merged 2 commits intovlang:masterfrom
ChAoSUnItY:string_refactor

Conversation

@ChAoSUnItY
Copy link
Copy Markdown
Member

  • This PR refactors string_test.v by removing println invocations in test functions.
  • And adds [inline] attribute to appropriate functions that has small function body.

@ChAoSUnItY ChAoSUnItY added the Unit: vlib Bugs/feature requests, that are related to the vlib. label Mar 11, 2023
@ChAoSUnItY ChAoSUnItY changed the title builint: string test refactor, string functions inlining builtin: string test refactor, string functions inlining Mar 11, 2023
@spytheman
Copy link
Copy Markdown
Contributor

What was the performance impact of the [inline] tag?
Did it help say ./vprod -o x.c cmd/v vs the version on master?

@ChAoSUnItY
Copy link
Copy Markdown
Member Author

Here is the result I tested on my machine (Windows 10, Intel i5-4430)
image

I would consider it slightly faster but not a huge performance impact

@spytheman spytheman merged commit f02b423 into vlang:master Mar 11, 2023
@ChAoSUnItY ChAoSUnItY deleted the string_refactor branch March 11, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Unit: vlib Bugs/feature requests, that are related to the vlib.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants