css vs python ? was WHY is python slow?

Robin Becker robin at jessikat.fsnet.co.uk
Mon Jul 2 03:51:06 EDT 2001


I just checked out css. using the rather trivial

//css
#loadLibrary 'ZcSysLib'
                          
main()
{
        var k=0, t0 = sysTimestamp();
        for(var i=0;i<1000000;i++){
                k += 1;
                }
        sysLog('seconds='+sysSecondsSince(t0));
}

and for python

#python
from time import time
def main():
        k = 0
        t0 = time()
        for i in xrange(1000000):
                k+=1
        print 'seconds=%.2f' % (time()-t0)

if __name__=='__main__':
        main()

C:\Tmp>css hello.css
seconds=32

C:\Tmp>python hello.py
seconds=0.60

C:\Tmp>
-- 
Robin Becker



More information about the Python-list mailing list