Re: Question of speed - Flat file DBMS

2005-03-06 Thread William Park
I.V. Aprameya Rao <[EMAIL PROTECTED]> wrote:
> Hi
> 
> I have to implement a flat file dbms. The basic condition is that 
> relations will be given in files and i will have to run certain select 
> project join queries on those relations. 
> 
> Can someone tell me as to which language will be faster, python or C++??

GDBM.  It's already flat file.

-- 
William Park <[EMAIL PROTECTED]>, Toronto, Canada
Slackware Linux -- because it works.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Question of speed - Flat file DBMS

2005-03-06 Thread Ian Parker
In message <[EMAIL PROTECTED]>, I.V. 
Aprameya Rao <[EMAIL PROTECTED]> writes
OK, i forgot to mention this.
The speed is a critical issue because there will be a competition and
whosever solution is faster wins the prize.
Hence will a python solution be as fast as a C++ solution??
aprameya
On 4 Mar 2005, John Machin wrote:
I.V. Aprameya Rao wrote:
> Hi
>
> I have to implement a flat file dbms. The basic condition is that
> relations will be given in files and i will have to run certain
select
> project join queries on those relations.
>
> Can someone tell me as to which language will be faster, python or
C++??
Faster to get a working app released: Python
Faster to drive you nuts: C++
Faster processing the files: My hunch is C++, but not by much. After
you've shipped your working app (in Python), you'll still have lots of
spare time to tweak up the speed -- IF it's slow, if anybody notices,
and if anybody cares -- and this newsgroup usually provides a lively
response to "how do I make this faster" questions.


The key to speed is disk caching.  Unless you're doing a profound amount 
of computation on your data, I doubt there'll be any significant 
difference between using Python or C++, except due to how much disk i/o 
is done by the different programs and language environments.

So cache as much as you can- read your entire database into memory if it 
will fit.  If not then try to ensure you can read your entire indices in 
memory.   Create an index for any field you'll be querying on to avoid 
having to read the entire record.  If you're dealing with massive data, 
think about indices of indices. Work on the data, or at least the 
indices. in memory.

Well, that's everything I ever learned about database design.
Regards
Ian
--
Ian Parker
--
http://mail.python.org/mailman/listinfo/python-list


Re: Question of speed - Flat file DBMS

2005-03-05 Thread Michael Hoffman
I.V. Aprameya Rao wrote:
The speed is a critical issue because there will be a competition and 
whosever solution is faster wins the prize.

Hence will a python solution be as fast as a C++ solution??
It depends how good you are at programming in each language. If you
are an expert C++ programmer you can surely make it go faster. But if
you were an expert C++ programmer you wouldn't be asking here.
Whenever I have done performance-critical stuff, using Pyrex has been
more than sufficient.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list


Re: Question of speed - Flat file DBMS

2005-03-05 Thread I.V. Aprameya Rao
OK, i forgot to mention this.

The speed is a critical issue because there will be a competition and 
whosever solution is faster wins the prize.

Hence will a python solution be as fast as a C++ solution??

aprameya

On 4 Mar 2005, John Machin wrote:

> 
> I.V. Aprameya Rao wrote:
> > Hi
> >
> > I have to implement a flat file dbms. The basic condition is that
> > relations will be given in files and i will have to run certain
> select
> > project join queries on those relations.
> >
> > Can someone tell me as to which language will be faster, python or
> C++??
> 
> Faster to get a working app released: Python
> 
> Faster to drive you nuts: C++
> 
> Faster processing the files: My hunch is C++, but not by much. After
> you've shipped your working app (in Python), you'll still have lots of
> spare time to tweak up the speed -- IF it's slow, if anybody notices,
> and if anybody cares -- and this newsgroup usually provides a lively
> response to "how do I make this faster" questions.
> 
> 
> 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Question of speed - Flat file DBMS

2005-03-04 Thread John Machin

I.V. Aprameya Rao wrote:
> Hi
>
> I have to implement a flat file dbms. The basic condition is that
> relations will be given in files and i will have to run certain
select
> project join queries on those relations.
>
> Can someone tell me as to which language will be faster, python or
C++??

Faster to get a working app released: Python

Faster to drive you nuts: C++

Faster processing the files: My hunch is C++, but not by much. After
you've shipped your working app (in Python), you'll still have lots of
spare time to tweak up the speed -- IF it's slow, if anybody notices,
and if anybody cares -- and this newsgroup usually provides a lively
response to "how do I make this faster" questions.

-- 
http://mail.python.org/mailman/listinfo/python-list


Question of speed - Flat file DBMS

2005-03-04 Thread I.V. Aprameya Rao
Hi

I have to implement a flat file dbms. The basic condition is that 
relations will be given in files and i will have to run certain select 
project join queries on those relations. 

Can someone tell me as to which language will be faster, python or C++??

Aprameya

-- 
http://mail.python.org/mailman/listinfo/python-list