Skip to content

Switching to the C stack is slow #1801

Closed
@brson

Description

@brson

pcwalton saw the C-stack-switching __morestack function show up surprisingly high on profiles. All this function does is change sp and call a function by pointer. Probably this is very bad for branch prediction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsI-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions