Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible optimisations in kwargs handling #46299

Closed
amauryfa opened this issue Feb 6, 2008 · 3 comments
Closed

Possible optimisations in kwargs handling #46299

amauryfa opened this issue Feb 6, 2008 · 3 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@amauryfa
Copy link
Member

amauryfa commented Feb 6, 2008

BPO 2015
Nosy @amauryfa, @pitrou, @briancurtin
Superseder
  • bpo-1819: Speed hack for function calls with named parameters
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-01-20.16:14:22.741>
    created_at = <Date 2008-02-06.00:45:14.432>
    labels = ['interpreter-core', 'type-feature']
    title = 'Possible optimisations in kwargs handling'
    updated_at = <Date 2010-01-20.16:14:22.732>
    user = 'https://github.com/amauryfa'

    bugs.python.org fields:

    activity = <Date 2010-01-20.16:14:22.732>
    actor = 'brian.curtin'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-01-20.16:14:22.741>
    closer = 'brian.curtin'
    components = ['Interpreter Core']
    creation = <Date 2008-02-06.00:45:14.432>
    creator = 'amaury.forgeotdarc'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 2015
    keywords = []
    message_count = 3.0
    messages = ['62085', '62267', '98083']
    nosy_count = 3.0
    nosy_names = ['amaury.forgeotdarc', 'pitrou', 'brian.curtin']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = '1819'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue2015'
    versions = ['Python 2.6']

    @amauryfa
    Copy link
    Member Author

    amauryfa commented Feb 6, 2008

    This is a reminder for the comment on top of ceval.c:
    /* XXX TO DO:
    XXX speed up searching for keywords by using a dictionary
    XXX document it!
    */

    It was also suggested to disallow subclasses of str in variable names,
    in order to optimize comparisons. This restriction is not necessary if a
    dict lookup is used: comparisons are less frequent and will often
    succeed when comparing pointers of interned strings.

    @amauryfa amauryfa added the type-feature A feature request or enhancement label Feb 6, 2008
    @tiran tiran added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Feb 6, 2008
    @pitrou
    Copy link
    Member

    pitrou commented Feb 11, 2008

    Amaury, you may take a look at the patch in issue bpo-1819.
    Also, dict lookups have a big overhead compared to raw pointer compares,
    I'm not sure naively converting all kwargs handling to dict lookups
    would make things faster.

    @briancurtin
    Copy link
    Member

    This was handled in r65241 as a result of bpo-1819.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants