Skip to content

pybench: Cannot compare 2.x and 3.x benchmarks #53348

Closed

Description

@abalkin
BPO 9102
Nosy @malemburg, @abalkin, @pitrou, @ezio-melotti, @florentx, @iritkatriel
Dependencies
  • bpo-5180: 3.1 cannot unpickle 2.7-created pickle
  • 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 = 'https://github.com/malemburg'
    closed_at = <Date 2021-06-17.10:50:02.098>
    created_at = <Date 2010-06-28.15:42:00.859>
    labels = ['type-bug']
    title = 'pybench: Cannot compare 2.x and 3.x benchmarks'
    updated_at = <Date 2021-06-17.10:50:02.097>
    user = 'https://github.com/abalkin'

    bugs.python.org fields:

    activity = <Date 2021-06-17.10:50:02.097>
    actor = 'lemburg'
    assignee = 'lemburg'
    closed = True
    closed_date = <Date 2021-06-17.10:50:02.098>
    closer = 'lemburg'
    components = ['Demos and Tools']
    creation = <Date 2010-06-28.15:42:00.859>
    creator = 'belopolsky'
    dependencies = ['5180']
    files = []
    hgrepos = []
    issue_num = 9102
    keywords = []
    message_count = 4.0
    messages = ['108834', '222691', '395991', '395992']
    nosy_count = 6.0
    nosy_names = ['lemburg', 'belopolsky', 'pitrou', 'ezio.melotti', 'flox', 'iritkatriel']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue9102'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    Activity

    1. abalkin commented on Jun 28, 2010

      @abalkin
      MemberAuthor

      There are several issues that prevent

      $ python3 Tools/pybench/pybench.py -s 27.bench -c 32.bench

      from working.

      1. There is a bug in _pickle that prevents 2.x pickles that contain classic class instances from loading in 3.x. This is addressed in bpo-5180.

      2. Once _pickle issue is addresses, 2.7 benchmark files still cannot be loaded because they contain references to the Unicode tests and Unicode.py is not loadable in python3.

      3. Once Unicode.py gets 2to3 treatment, we are still left with

      • Benchmark versions differ: cannot compare this benchmark to "32.bench" !

      The last issue is probably the simplest. Version number was bumped up in r69411, and a log entry says that the intent was to keep pybench 2.1 compatible with 2.x. Indeed, pybench 2.1 from py3k runs under trunk python and resulting benchmark file can be compared with 3.x generated benchmark once issues 1 and 2 above are resolved. It may, however be worth consideration to synchronize pybench versions shipped with 27 and 32. I understand that this is likely to be too late for 2.7, but I am checking 2.7 version in case this is considered appropriate for 2.7.1.

      The Unicode.py issue was discussed under bpo-5180 in msg108819 and msg108821. I like MAL's suggestion of Strings3 module, but I think it would be useful to be able to compare 2.x str performance to both 3.x str and 3.x bytes. Similarly, I think String3 should have from __future__ import unicode_literals and be loadable in 2.7/2.6 and server as means to compare 2.x and 3.x unicode performance.

      For the _pickle issue, I am about to attach a patch to bpo-5180.

    2. BreamoreBoy commented on Jul 10, 2014

      BreamoreBoymannequin
      Mannequin

      @alexander do you want to pick this up again?

    3. iritkatriel commented on Jun 17, 2021

      @iritkatriel
      Member

      Can we close this? I don't think we are still interested in performance comparisons with Python 2.

    4. malemburg commented on Jun 17, 2021

      @malemburg
      Member

      Yes, closing.

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions