Re: [Rcpp-devel] Question on performance

2018-09-23 Thread Dirk Eddelbuettel
On 23 September 2018 at 08:29, Kyle Baron wrote: | It didn't change anything in my testing. I wondered about wrapping the | whole thing too ... but maybe that's premature? I can't tell were the | slow-down is. | | My ratio is around 2.4 or 2.5 with this: | | https://github.com/jesusfv/Compa

Re: [Rcpp-devel] Question on performance

2018-09-23 Thread Kyle Baron
It didn't change anything in my testing. I wondered about wrapping the whole thing too ... but maybe that's premature? I can't tell were the slow-down is. My ratio is around 2.4 or 2.5 with this: https://github.com/jesusfv/Comparison-Programming-Languages-Economics/compare/master...kylebmetrum

Re: [Rcpp-devel] Question on performance

2018-09-23 Thread Dirk Eddelbuettel
On 23 September 2018 at 14:50, Iñaki Ucar wrote: | El dom., 23 sept. 2018 14:39, Dirk Eddelbuettel escribió: | | > | > On 23 September 2018 at 13:01, Iñaki Ucar wrote: | > | Also you can try adding | > | | > | // [[Rcpp::plugins(unwindProtect)]] | > | | > | to InsideLoop.cpp. That should boost

Re: [Rcpp-devel] Question on performance

2018-09-23 Thread Iñaki Ucar
El dom., 23 sept. 2018 14:39, Dirk Eddelbuettel escribió: > > On 23 September 2018 at 13:01, Iñaki Ucar wrote: > | Also you can try adding > | > | // [[Rcpp::plugins(unwindProtect)]] > | > | to InsideLoop.cpp. That should boost the performance too with the > | latest version of Rcpp. > > Maybe, m

Re: [Rcpp-devel] Question on performance

2018-09-23 Thread Dirk Eddelbuettel
On 23 September 2018 at 13:01, Iñaki Ucar wrote: | Also you can try adding | | // [[Rcpp::plugins(unwindProtect)]] | | to InsideLoop.cpp. That should boost the performance too with the | latest version of Rcpp. Maybe, maybe not. Are there lots of calls happening here? Should be easy enough t

Re: [Rcpp-devel] Question on performance

2018-09-23 Thread Iñaki Ucar
Also you can try adding // [[Rcpp::plugins(unwindProtect)]] to InsideLoop.cpp. That should boost the performance too with the latest version of Rcpp. Iñaki El dom., 23 sept. 2018 a las 12:46, Kyle Baron () escribió: > > > I got mOutput mixed up with mResults in the last message; it mResults tha

Re: [Rcpp-devel] Question on performance

2018-09-23 Thread Kyle Baron
I got mOutput mixed up with mResults in the last message; it mResults that gets created up front and then every iteration. https://github.com/jesusfv/Comparison-Programming-Languages-Economics/blob/master/RBC_Rcpp.R#L45 https://github.com/jesusfv/Comparison-Programming-Languages-Economics/blob/mas

Re: [Rcpp-devel] Question on performance

2018-09-23 Thread Kyle Baron
It seems like the sourceCpp thing is the biggie. That dropped about a second of the time from something like 2.7 to 1.7 seconds They also create mOutput and then re-create it every time it goes into InsideLoop https://github.com/jesusfv/Comparison-Programming-Languages-Economics/blob/master/RBC_R