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

optimize the python version of abs2 in the microbenchmarks #26223

Merged
merged 1 commit into from
Feb 27, 2018
Merged

optimize the python version of abs2 in the microbenchmarks #26223

merged 1 commit into from
Feb 27, 2018

Conversation

wm75
Copy link
Contributor

@wm75 wm75 commented Feb 27, 2018

the Python version of abs2 introduced as part of fixing #24097 is very inefficient because it uses numpy.real and numpy.imag on builtin python complex numbers.
This PR changes the function to use complex.real and complex.imag methods instead, resulting in a significant speedup (explaining most of the Python-specific slowdown brought about by introducing the function in the first place).

@StefanKarpinski
Copy link
Sponsor Member

Seems reasonable.

@simonbyrne simonbyrne merged commit a29a989 into JuliaLang:master Feb 27, 2018
mbauman added a commit that referenced this pull request Mar 5, 2018
…gnment

* master:
  Make stdlib tests runnable standalone. (#26242)
  fix unary-related parsing regressions caused by #26154 (#26239)
  Formatting changes to new SSA IR devdocs [ci skip]
  use medium code model on PPC
  `retry` should support the check function proposed in the docstring. (#26138)
  mention axes in docs instead of size (#26233)
  exclude more CI files from source distro (#25906)
  Describe three-valued logic in docstrings
  deprecate using the value of `.=`. fixes #25954 (#26088)
  backport change to make CodegenPrepare work with isNoopAddrSpaceCast
  optimize the python version of abs2 in the microbenchmarks (#26223)
  Add notes for package maintainers (#25912)
  typo
  Fix broken links to functions in the manual (#26171)
  [NewOptimizer] Track inlining info
  Begin work on new optimizer framework
  add patch to make GC address spaces work on PPC
  also backport sover patch to LLVM 4.0
@wm75 wm75 deleted the py_microbenchmark_abs2_optimization branch March 12, 2018 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants