GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use sumprod() to simplify, speed up, and improve accuracy of statistics functions · Issue #102670 · python/cpython

Use sumprod() to simplify, speed up, and improve accuracy of statistics functions #102670

New issue
Copy link
New issue
Copy link
Closed
Closed
Use sumprod() to simplify, speed up, and improve accuracy of statistics functions#102670
Copy link
Labels
3.12only security fixesonly security fixesperformancePerformance or resource usagePerformance or resource usage

Description

@rhettinger
rhettinger
opened on Mar 13, 2023
Issue body actions
  • Use sumprod() which is faster, simpler, and more accurate than rounding each multiplication before summation.
  • For an additional speed-up and simplification, compute the (x_xi - bar) only once instead of multiple times.
  • For Spearman's rank correlation, we can skip the (x_xi - bar) step because the ranks are centered around zero.

Linked PRs

  • GH-102670: Use sumprod() to simplify, speed up, and improve accuracy of statistics functions #102649

Activity

  1. rhettinger
    added
    performancePerformance or resource usagePerformance or resource usage
    3.12only security fixesonly security fixes
    on Mar 13, 2023
  2. rhettinger
    added a commit that references this issue on Mar 14, 2023

    GH-102670: Use sumprod() to simplify, speed up, and improve accuracy …

    457e4d1
  3. rhettinger
    closed this as completedon Mar 14, 2023
  4. carljm
    added a commit that references this issue on Mar 14, 2023

    Merge branch 'main' into inlinecomp2

    6c5f269
  5. Fidget-Spinner
    added a commit that references this issue on Mar 27, 2023

    pythonGH-102670: Use sumprod() to simplify, speed up, and improve acc…

    5b8c3cb
  6. warsaw
    added a commit that references this issue on Apr 11, 2023

    pythonGH-102670: Use sumprod() to simplify, speed up, and improve acc…

    f767f4b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixesonly security fixesperformancePerformance or resource usagePerformance or resource usage

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.