Skip to content

Simplifying ascii-decode #123894

@rhpvorderman

Description

@rhpvorderman

Feature or enhancement

Proposal:

This is a trivial enhancement of the ascii_decode function in unicodeobject.c. By using memcpy on unaligned pointers, the compiler will use unaligned loads on platforms that support it. Most platforms do.

Currently the ascii_decode function looks very byzantine. By writing it slightly differently using memcpy, lots of lines can be removed while also becoming more readable in my opinion.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions