Skip to content

@AlwaysInline String.length() #9710

@nreid260

Description

@nreid260

Feature request

Please include the following information:

Is your feature request related to a problem? Please describe.

When I graalify the Kotlin compiler, String.length isn't inlined. This is surprising because it's a trivial function. In my image, this function takes about 2% of profiled runtime.

Describe the solution you'd like.

@AlwaysInline String.length()

Describe who do you think will benefit the most.

Users of GraalVM apps

Describe alternatives you've considered.

Maybe there's something more clever? I'm not sure.

Additional context.

Profile:
image

When I try to add this feature myself, I get an error saying a substitution for the function already exists, which conflicts.

Express whether you'd like to help contributing this feature

Not really.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions