Skip to content

More efficient formatting of ints and floats in json #70906

Closed

Description

@serhiy-storchaka
BPO 26719
Nosy @gvanrossum, @warsaw, @rhettinger, @amauryfa, @ncoghlan, @pitrou, @giampaolo, @ezio-melotti, @ethanfurman, @ericsnowcurrently, @serhiy-storchaka
Files
  • json_int_float_formatting.patch
  • 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/serhiy-storchaka'
    closed_at = <Date 2016-04-10.11:52:51.605>
    created_at = <Date 2016-04-09.10:06:03.337>
    labels = ['extension-modules', 'type-feature', 'library']
    title = 'More efficient formatting of ints and floats in json'
    updated_at = <Date 2016-04-10.11:52:51.604>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2016-04-10.11:52:51.604>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2016-04-10.11:52:51.605>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules', 'Library (Lib)']
    creation = <Date 2016-04-09.10:06:03.337>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['42410']
    hgrepos = []
    issue_num = 26719
    keywords = ['patch']
    message_count = 5.0
    messages = ['263077', '263080', '263100', '263102', '263132']
    nosy_count = 14.0
    nosy_names = ['gvanrossum', 'barry', 'rhettinger', 'amaury.forgeotdarc', 'ncoghlan', 'pitrou', 'giampaolo.rodola', 'ezio.melotti', 'eli.bendersky', 'cvrebert', 'ethan.furman', 'python-dev', 'eric.snow', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue26719'
    versions = ['Python 3.5', 'Python 3.6']

    Activity

    1. serhiy-storchaka commented on Apr 9, 2016

      @serhiy-storchaka
      MemberAuthor

      Proposed patch provide more efficient solution of bpo-18264. Instead of creating new int or float object and then converting it to string, the patch directly uses functions that does int and float conversion to string.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Apr 9, 2016
    3. rhettinger commented on Apr 9, 2016

      @rhettinger
      Contributor

      +1 This is a nice improvement.

    4. gvanrossum commented on Apr 9, 2016

      @gvanrossum
      Member

      Please also backport to 3.5.2...

      On Saturday, April 9, 2016, Raymond Hettinger <report@bugs.python.org>
      wrote:

      Raymond Hettinger added the comment:

      +1 This is a nice improvement.

      ----------


      Python tracker <report@bugs.python.org <javascript:;>>
      <http://bugs.python.org/issue26719\>


    5. serhiy-storchaka commented on Apr 9, 2016

      @serhiy-storchaka
      MemberAuthor

      There is similar issue with unneeded strings copying: bpo-26057.

    6. python-dev commented on Apr 10, 2016

      python-devmannequin
      Mannequin

      New changeset 4d4febb76864 by Serhiy Storchaka in branch '3.5':
      Issue bpo-26719: More efficient formatting of ints and floats in json.
      https://hg.python.org/cpython/rev/4d4febb76864

      New changeset 36b15a9776ae by Serhiy Storchaka in branch 'default':
      Issue bpo-26719: More efficient formatting of ints and floats in json.
      https://hg.python.org/cpython/rev/36b15a9776ae

    7. 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

    Labels

    extension-modulesC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions