Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78358

Re: Dynamically swapping between two algorithms

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ethan@stoneleaf.us>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'value,': 0.04; 'dynamically': 0.07; 'modify': 0.07; 'subject:two': 0.07; 'calculating': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; '~ethan~': 0.09; 'inserting': 0.16; 'subject:between': 0.16; 'wrote:': 0.18; 'file,': 0.19; 'import': 0.22; 'header:User-Agent:1': 0.23; 'source': 0.25; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'fixed': 0.29; 'am,': 0.29; 'code': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'file': 0.32; 'figure': 0.32; 'machine.': 0.36; 'charset:us-ascii': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:173': 0.61; 'timings': 0.84
Date Thu, 25 Sep 2014 20:11:43 -0700
From Ethan Furman <ethan@stoneleaf.us>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
MIME-Version 1.0
To python-list@python.org
Subject Re: Dynamically swapping between two algorithms
References <54218831$0$29979$c3e8da3$5496439d@news.astraweb.com>
In-Reply-To <54218831$0$29979$c3e8da3$5496439d@news.astraweb.com>
Content-Type text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14373.1411701105.18130.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1411701105 news.xs4all.nl 2912 [2001:888:2000:d::a6]:43832
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:78358

Show key headers only | View raw


On 09/23/2014 07:48 AM, Steven D'Aprano wrote:
>
> alas, the CUTOVER point is likely to be machine-dependent. Take it as a
> given that inserting a fixed CUTOVER point into the source code (say,
> ``CUTOVER = 123456``) is not likely to be very effective, and dynamically
> calculating it at import time is impractical.

Have your setup script do some timings to figure out where CUTOFF is on any particular machine.  You can then store it 
in a .conf file, or directly modify the source file with the value, or ...

--
~Ethan~

Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Dynamically swapping between two algorithms Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-24 00:48 +1000
  Re: Dynamically swapping between two algorithms Chris Angelico <rosuav@gmail.com> - 2014-09-24 01:24 +1000
  Re: Dynamically swapping between two algorithms emile <emile@fenx.com> - 2014-09-23 08:33 -0700
  Re: Dynamically swapping between two algorithms MRAB <python@mrabarnett.plus.com> - 2014-09-23 16:42 +0100
  Re: Dynamically swapping between two algorithms Terry Reedy <tjreedy@udel.edu> - 2014-09-23 15:21 -0400
  Re: Dynamically swapping between two algorithms C Smith <illusiontechniques@gmail.com> - 2014-09-23 13:54 -0700
  Re: Dynamically swapping between two algorithms dieter <dieter@handshake.de> - 2014-09-24 09:44 +0200
  Re: Dynamically swapping between two algorithms Cameron Simpson <cs@zip.com.au> - 2014-09-26 10:30 +1000
  Re: Dynamically swapping between two algorithms Ethan Furman <ethan@stoneleaf.us> - 2014-09-25 20:11 -0700

csiph-web