Hallo Fred, vous ecrit au Sun, 27 Nov 2022 12:29:45 +0000:
> Note that llvm "is" optimization, without it there is no sense to use > it. I did some test with float calculations and the difference was > big (much better for fpc-llvm) when adding -O3 or -O4 parameters. Well. I just modified my test (a simple prime calculator) to use floats (doubles, to be exact) for its calculations, and that's what I got: floatprime_322_O3: floatprime_331_O3: floatprime_llvm_O3: real 0m2,591s real 0m0,364s real 0m0,290s user 0m2,584s user 0m0,317s user 0m0,225s sys 0m0,006s sys 0m0,047s sys 0m0,065s floatprime_322_O4: floatprime_331_O4: floatprime_llvm_O4: real 0m2,614s real 0m0,367s real 0m0,305s user 0m2,610s user 0m0,307s user 0m0,244s sys 0m0,003s sys 0m0,060s sys 0m0,061s For reference, these are the integer calculation values: prime_322_O3: prime_331_O3: prime_llvm_O3: real 0m2,317s real 0m3,491s real 0m3,336s user 0m2,262s user 0m2,787s user 0m2,661s sys 0m0,054s sys 0m0,703s sys 0m0,674s prime_322_O4: prime_331_O4: prime_llvm_O4: real 0m2,304s real 0m3,497s real 0m3,353s user 0m2,261s user 0m2,769s user 0m2,618s sys 0m0,042s sys 0m0,727s sys 0m0,733s In both cases, the "322" means "standard" fpc 3.2.2, "331" means "plain" (not llvm-based) fpc 3.3.1, and llvm fpc 3.3.1 llvm-based. "O3" stands for -O3, and O4 for -O4 optimization. So, I'm not so sure. It seems that the new fpc compiler, 3.3.1, became somewhat WORSE on integer calculations, but was enormously enhanced for floating point operations. In fact, it's nearly on par with the times of the llvm-based version, although the "plain" 331 was built long before I even thought of playing with llvm. This does even suggest that the enhancements seen with the "llvm" version of fpc MIGHT be mostly due to enhancements of fpc itself, and not so much be caused by better performance of llvm-generated code. Now, I think it might be of interest to know whether your claimed big difference of performance still holds when you compare the results of your test code compiled with "plain" fpc 3.3.1 and it's llvm-based version. -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) ----------------------------------------------------------- Mit freundlichen Grüßen, S. Schicktanz ----------------------------------------------------------- _______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

