[fpc-pascal] [fcl-web] [fphttpserver] what should pathinfo contain?
I recently has a problem with Brook where every request except default fails and when I debug, I see that pathinfo always has the same content as host. Is this correct? Because AFAIK it should contain host + URI. In the fcl-web flow, before processing host: header, pathinfo does contain URI. FPC r26156 -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fcl-web-fphttpserver-what-should-pathinfo-contain-tp5718068.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Optimisation : X+X or 2*X or X*2 ?
On 01/19/2014 10:45 PM, Sven Barth wrote: On 19.01.2014 20:47, Ched wrote: Dear Freepascalers, The multiplication in floating arthmetic units is usualy know as being slower than the addition. So, have I interest to code X+X, 2*X or X*2 when using reals (mainly double and extended) ?And with integers ? Can't really comment on floats, but for integers the fasted to multiply by 2 should be a shift left. Can the compiler optimise this operation choosing the fastest one - probably depending on the architecture x86, arm, aso. It can if someone codes support for it (maybe some code generators already have such simplifications). I thought I've at least seen such code for integers (that exactly converts *2 to a shl), but I can't find it currently... Integer multiplication by a power of 2 constant is converted to a SHL in pass 1, see nadd.pas:2869. Nikolay ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Optimisation : X+X or 2*X or X*2 ?
That is right for positive integers. But for floating point numbers ? Cheers, Raoul Le 19 janv. 2014 21:23, "Philippe" a écrit : > forgot > > X shl 1 > > normaly the fastest ... > > > > Em 19.01.2014 17:47, Ched escreveu: > > Dear Freepascalers, > > The multiplication in floating arthmetic units is usualy know as being slower > than the addition. So, have > I interest to code X+X, 2*X or X*2 when using reals (mainly double and > extended) ?And with integers ? > > Can the compiler optimise this operation choosing the fastest one - probably > depending on the > architecture x86, arm, aso. > > Cheers, Raoul > ___ > fpc-pascal maillist - > fpc-pascal@lists.freepascal.orghttp://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal > > > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Optimisation : X+X or 2*X or X*2 ?
On 19.01.2014 20:47, Ched wrote: Dear Freepascalers, The multiplication in floating arthmetic units is usualy know as being slower than the addition. So, have I interest to code X+X, 2*X or X*2 when using reals (mainly double and extended) ?And with integers ? Can't really comment on floats, but for integers the fasted to multiply by 2 should be a shift left. Can the compiler optimise this operation choosing the fastest one - probably depending on the architecture x86, arm, aso. It can if someone codes support for it (maybe some code generators already have such simplifications). I thought I've at least seen such code for integers (that exactly converts *2 to a shl), but I can't find it currently... Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Optimisation : X+X or 2*X or X*2 ?
On 19.01.2014 21:07, Philippe wrote: forgot X shl 1 normaly the fastest ... But only for ints, not floating point values. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Optimisation : X+X or 2*X or X*2 ?
forgot X shl 1 normaly the fastest ... Em 19.01.2014 17:47, Ched escreveu: > Dear Freepascalers, > > The multiplication in floating arthmetic units is usualy know as being slower than the addition. So, have > I interest to code X+X, 2*X or X*2 when using reals (mainly double and extended) ?And with integers ? > > Can the compiler optimise this operation choosing the fastest one - probably depending on the > architecture x86, arm, aso. > > Cheers, Raoul > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal [1] Links: -- [1] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Optimisation : X+X or 2*X or X*2 ?
Dear Freepascalers, The multiplication in floating arthmetic units is usualy know as being slower than the addition. So, have I interest to code X+X, 2*X or X*2 when using reals (mainly double and extended) ?And with integers ? Can the compiler optimise this operation choosing the fastest one - probably depending on the architecture x86, arm, aso. Cheers, Raoul ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal