[cctbxbb] flex.int.as_double() performance

richard.gildea at diamond.ac.uk richard.gildea at diamond.ac.uk
Tue Oct 11 14:47:38 PDT 2016


Further timing comparisons on linux (RHEL6):

Before:

$ libtbx.python time_as_double.py
flex.int.as_double(): 8.99s (0.090s/call)
numpy.astype(np.float64): 2.34s (0.023s/call)

After:

$ libtbx.python time_as_double.py
flex.int.as_double(): 1.79s (0.018s/call)
numpy.astype(np.float64): 2.33s (0.023s/call)

If no one objects I will commit this change tomorrow. All the tests (scitbx, cctbx, dxtbx, dials, xia2, etc appear to pass with the modified code).

Cheers,

Richard

Dr Richard Gildea
Data Analysis Scientist
Tel: +441235 77 8078

Diamond Light Source Ltd.
Diamond House
Harwell Science & Innovation Campus
Didcot
Oxfordshire
OX11 0DE
________________________________
From: cctbxbb-bounces at phenix-online.org [cctbxbb-bounces at phenix-online.org] on behalf of Nicholas Sauter [nksauter at lbl.gov]
Sent: 11 October 2016 19:55
To: cctbx mailing list
Subject: Re: [cctbxbb] flex.int.as_double() performance

Richard,

No comment except "Great work" figuring this out!

Nick

Nicholas K. Sauter, Ph. D.
Senior Staff Scientist, Molecular Biophysics & Integrated Bioimaging Division
Lawrence Berkeley National Laboratory
1 Cyclotron Rd., Bldg. 33R0345
Berkeley, CA 94720
(510) 486-5713

On Tue, Oct 11, 2016 at 9:44 AM, Luc Bourhis <luc_j_bourhis at mac.com<mailto:luc_j_bourhis at mac.com>> wrote:
Hi Richard,

On 11 Oct 2016, at 15:11, richard.gildea at diamond.ac.uk<mailto:richard.gildea at diamond.ac.uk> wrote:

     shared_plain<double> result(a.begin(), a.end());

eventually, that results in calling std::uninitialized_copy. This has a significant overhead compared to std::copy which could be used here for simple types such as integers and doubles, probably resulting in another big boost. This could be done with hairy template specialisations I guess but not sure it’s worth the sweat!!


_______________________________________________
cctbxbb mailing list
cctbxbb at phenix-online.org<mailto:cctbxbb at phenix-online.org>
http://phenix-online.org/mailman/listinfo/cctbxbb



-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom




More information about the cctbxbb mailing list