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


Groups > comp.lang.python > #66530

Re: inheriting a large python code base

References <CAOF-KfiD=UgMg7GHiiPiT47zETJmrkicX4YTrxfh4=T2FSq64Q@mail.gmail.com> <mailman.7028.1392505094.18130.python-list@python.org> <roy-F1B3DF.18150315022014@news.panix.com> <ff79ffd3-7d39-4a55-95c3-ddada5ee4955@googlegroups.com>
Date 2014-02-16 07:59 -0500
Subject Re: inheriting a large python code base
From Rita <rmorgan466@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.7051.1392555592.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

when I do profiling is it possible to find out if I am spending a lot of
time in type conversion?
it seems I am not. Also, is it possible to predeclare a type in python?
Similar to C: int i=0;




On Sat, Feb 15, 2014 at 10:06 PM, Rustom Mody <rustompmody@gmail.com> wrote:

> On Sunday, February 16, 2014 4:45:04 AM UTC+5:30, Roy Smith wrote:
> > In article Cameron Simpson  wrote:
>
> > > On 15Feb2014 12:10, Rita wrote:
> > > > i just inherited a large python code base and I would like to
> optimize the
> > > > code (run faster). The application is a scientific application so I
> really
> > > > don't understand the internal logic.
> > > [...]
> > > One thing I would keep in mind is that scientific applications
> > > generally involve floating point math. That is subject to loss of
> > > precision if done the wrong way.
>
> > Another thing to keep in mind is that scientific applications are often
> > written by {physicists, chemists, astronomers, etc} who have no clue
> > about how floating point math, or indeed much of anything about
> > computers, works :-)
>
> Not exactly my experience.
> Most of the {physicists, chemists, astronomers, etc}s I know grok
> floating point better than Ive been able to do in 30 years.
> They dont get much else though! -- Usually called 'Fortran programmers'.
>
> The guy who taught me numerical analysis -- a brilliant chemist -- could
> never understand why anyone should want to use anything other than Fortran.
> And it was a self-evident God's truth that a variable starting with
> I-N was integer Rest real.
> Declarations??  Pshaw! Sissy stuff!
> "I *IS* an integer and no hanky-panky about it"
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
--- Get your facts first, then you can distort them as you please.--

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


Thread

Re: inheriting a large python code base Cameron Simpson <cs@zip.com.au> - 2014-02-16 09:32 +1100
  Re: inheriting a large python code base Roy Smith <roy@panix.com> - 2014-02-15 18:15 -0500
    Re: inheriting a large python code base Rustom Mody <rustompmody@gmail.com> - 2014-02-15 19:06 -0800
      Re: inheriting a large python code base Rita <rmorgan466@gmail.com> - 2014-02-16 07:59 -0500
      Re: inheriting a large python code base Chris Angelico <rosuav@gmail.com> - 2014-02-17 00:26 +1100

csiph-web