Slow Speed

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Slow Speed

Animesh Saxena
Last time I used QuantLib it was faster, but now I guess due to new features it is becoming a bloated package. For simple option pricing it takes a minute to compile. Any way to reduce the compile time, I mean coz how long does it take to simply get a black scholes price?

I compile using Kdevelop and my makefile is as follows (CMake)

project(calloption)

add_executable(calloption main.cpp)

target_link_libraries (calloption QuantLib)

Anyway to speed up compilation?


-
Animesh



http://www.coffeequant.com/



------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Slow Speed

Bojan Nikolic

Don't compile in the parameters of the instrument that you are trying to
price -- either read that information in at run-time or use one of the
many wrapper interfaces.


--
Bojan Nikolic          ||          http://www.bnikolic.co.uk

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Slow Speed

Animesh Saxena
can you please elaborate ur answer. i think you might be hinting at a shared library. i already compiled quantlib to be a shared library using ./configure --enable-shared. Am not exactly sure how to link specific parts of it...and not the whole library. 

I have no idea about wrapper interfaces...

-animesh


On Fri, Jan 6, 2012 at 9:07 PM, Bojan Nikolic <[hidden email]> wrote:

Don't compile in the parameters of the instrument that you are trying to
price -- either read that information in at run-time or use one of the
many wrapper interfaces.


--
Bojan Nikolic          ||          http://www.bnikolic.co.uk


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Slow Speed

Luigi Ballabio
In reply to this post by Animesh Saxena
On Fri, Jan 6, 2012 at 4:29 PM, Animesh Saxena
<[hidden email]> wrote:
> Last time I used QuantLib it was faster, but now I guess due to new features
> it is becoming a bloated package. For simple option pricing it takes a
> minute to compile. Any way to reduce the compile time, I mean coz how long
> does it take to simply get a black scholes price?
>
> Anyway to speed up compilation?

How are you including the files you need?  If you just go for
#include <ql/quantlib.hpp>
you're going to include a lot of unnecessary baggage.  If you aren't
already doing so, I'd try including only the specific headers you
need.

Luigi

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Slow Speed

Animesh Saxena
oh okk...got it.....if i include only specific headers...compile time reduces drastically...
thanks a lot

-animesh


On Sat, Jan 7, 2012 at 2:06 AM, Luigi Ballabio <[hidden email]> wrote:
On Fri, Jan 6, 2012 at 4:29 PM, Animesh Saxena
<[hidden email]> wrote:
> Last time I used QuantLib it was faster, but now I guess due to new features
> it is becoming a bloated package. For simple option pricing it takes a
> minute to compile. Any way to reduce the compile time, I mean coz how long
> does it take to simply get a black scholes price?
>
> Anyway to speed up compilation?

How are you including the files you need?  If you just go for
#include <ql/quantlib.hpp>
you're going to include a lot of unnecessary baggage.  If you aren't
already doing so, I'd try including only the specific headers you
need.

Luigi


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users