[Swift-user] Performance of Swift

Ben Clifford benc at hawaga.org.uk
Sat Jun 7 07:03:21 CDT 2008


> > Do you think changing the whole program into Swift script is necessary or
> > just certain sections?  Can i just use wrappers around certain tasks and use
> > Swift Script to call these tasks?

Almost definitely do not convert that whole program into SwiftScript - 
Swift is not intended to efficiently execute "short" operations like 
string operations. It would deal better with plugging together larger 
pieces of your application (eg pieces that take minutes to run), with 
those implemented in (in your case) perhaps C.

To get decent benefit, though, I think you will need to figure out which 
pieces can run in parallel - breaking your app into eg 4 pieces and then 
only running them in sequence won't give much/any performance improvement.

You program looks almost, but not quite, like a genetic algorithm 
implementation; and there is a lot on the web about parallelising those.



-- 




More information about the Swift-user mailing list