Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-)
From: mse00...@gmail.com To: mseide-msegui-talk@lists.sourceforge.net Date: Sat, 31 Jan 2015 15:56:32 +0100 Subject: Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-) On Saturday 31 January 2015 15:14:50 Fred van Stappen wrote: Hello. Is it possible to compile MSEide with MSEang ? Yes, when MSElang is finished. In some years... https://gitorious.org/mseide-msegui/pages/Mselang Martin Ha, ok. i will wait then... ;-) Hum, by the way, i will not be against = Var bool1, bool2, bool3 : boolean = false; Nor against = Var int1, int2, int3 : integer = 255; Thanks. Fre;D -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-)
On Friday 30 January 2015 19:25:09 misu kun wrote: if you add inline to test function , fpc 3.1.1 will produce ~ the same assember The difference is that LLVM knows that the procedure has no sideffects and that it is called with constant arguments - it produces a constant result and can be replaced by a constant assignment. Another example: program test1; var gi1: int32; function test(p1: int32): int32; var i1: int32; pi1: ^int32; begin pi1:= @i1; pi1^:= p1; result:= pi1^; exitcode:= result+2+gi1; end; begin gi1:= 123; gi1:= test(gi1); exitcode:= gi1; end. MSElang-LLVM: .file test-opt.ll .text .globl main .align 16, 0x90 .type main,@function main: # @main # BB#0: movl $123, __unnamed_1 movl $123, %eax ret .Ltmp0: .size main, .Ltmp0-main .type __unnamed_1,@object # @0 .local __unnamed_1 .comm __unnamed_1,4,4 .section .note.GNU-stack,,@progbits FPC: [...] .section .text .balign 16,0x90 .globl P$TEST1_TEST$LONGINT$$LONGINT .type P$TEST1_TEST$LONGINT$$LONGINT,@function P$TEST1_TEST$LONGINT$$LONGINT: # Temps allocated between esp+4 and esp+4 # [test1.pas] # [9] begin subl $4,%esp # Var p1 located in register eax # Var $result located in register eax # Var pi1 located in register edx # Var i1 located at esp+0 # [10] pi1:= @i1; movl %esp,%edx # [11] pi1^:= p1; movl %eax,(%edx) # [13] exitcode:= result+2+gi1; movl %eax,%edx addl $2,%edx movl U_P$TEST1_GI1,%ecx addl %ecx,%edx movl %edx,operatingsystem_result # [14] end; addl $4,%esp ret [...] main: # Temps allocated between esp+0 and esp+0 # [16] begin call FPC_INITIALIZEUNITS # [17] gi1:= 123; movl $123,%eax # [18] gi1:= test(gi1); movl %eax,U_P$TEST1_GI1 call P$TEST1_TEST$LONGINT$$LONGINT movl %eax,U_P$TEST1_GI1 # [19] exitcode:= gi1; movl %eax,operatingsystem_result # [20] end. call FPC_DO_EXIT ret [...] Martin -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-)
How is this related to the future = The promise also offers combination of async=parallel ( all() ) sync=waited (then()) execution, for instance : Promise.all([async_func1(),..async_funcN(),..]).then(sync_func1()).then(sync_func2))... async_funcX() run in parallel (on different cores etc) and sync_func1() will run once all of async_funcX() finish. -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-)
On 01/25/2015 07:32 PM, Ivanko B wrote: How about the Promise conseption for task parallelizing/waiting as a benifitiar of multiple cores? How is this related to the future notation used in Delphi Prism (aka Oxygen )? -Michael -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-)
Preventing from tossing registers stack we see in the example minimizes function call overhead :) and llvm beat gcc too i guess == Until gcc 2014+, for some scenarios, for sure What I saw up to now from LLVM backend is really impressive == And the one is constantly being improbed by the large community. -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-)
Totally agree with you. :) I think that using LLVM is a right choice. 2015-01-23 18:30 GMT+01:00 Martin Schreiber mse00...@gmail.com: On Friday 23 January 2015 17:20:55 Julio Jiménez wrote: BTW, GCC 4.9 vs LLVM CLang 3.5 at Phoronix What I saw up to now from LLVM backend is really impressive. I also like the concept with the LLVM bitcode input because it enables to use multiple cores for the MSElang frontend and the unit optimisations and machine code generation stages by means of OS multitasking without error-prone in process multi-threading. Martin -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk -- Julio Jiménez Borreguero -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-)
On Friday 23 January 2015 17:20:55 Julio Jiménez wrote: BTW, GCC 4.9 vs LLVM CLang 3.5 at Phoronix What I saw up to now from LLVM backend is really impressive. I also like the concept with the LLVM bitcode input because it enables to use multiple cores for the MSElang frontend and the unit optimisations and machine code generation stages by means of OS multitasking without error-prone in process multi-threading. Martin -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-)
BTW, GCC 4.9 vs LLVM CLang 3.5 at Phoronix http://www.phoronix.com/scan.php?page=articleitem=gcc49_compiler_llvm35 2015-01-23 14:09 GMT+01:00 Martin Schreiber mse00...@gmail.com: Hi, Here the first comparison of FPC and MSElang produced code: Source: program test1; function test(p1: int32): int32; var i1: int32; begin i1:= p1; result:= p1+i1; end; begin exitcode:= test(123); end. MSElang with LLVM backend with -O3: .file test-opt.ll .text .globl main .align 16, 0x90 .type main,@function main: # @main # BB#0: movl$246, %eax ret .Ltmp0: .size main, .Ltmp0-main .section.note.GNU-stack,,@progbits FPC fixes_2_6 with -O3: .file test1.pas [...] .globl P$TEST1_TEST$LONGINT$$LONGINT .type P$TEST1_TEST$LONGINT$$LONGINT,@function P$TEST1_TEST$LONGINT$$LONGINT: # Temps allocated between esp+0 and esp+0 # Var p1 located in register edx # Var $result located in register eax # Var i1 located in register eax # [test1.pas] # [6] begin movl%eax,%edx # [7] i1:= p1; movl%edx,%eax # [8] result:= p1+i1; addl%edx,%eax # [9] end; ret [...] .globl main .type main,@function main: # Temps allocated between esp+0 and esp+0 # [11] begin callFPC_INITIALIZEUNITS # [12] exitcode:= test(123); movl$123,%eax callP$TEST1_TEST$LONGINT$$LONGINT movl%eax,operatingsystem_result # [13] end. callFPC_DO_EXIT ret [...] ;-) Martin -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk -- Julio Jiménez Borreguero -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-)
Comparison? ;) Well, bit by bit... :) 2015-01-23 14:09 GMT+01:00 Martin Schreiber mse00...@gmail.com: Hi, Here the first comparison of FPC and MSElang produced code: Source: program test1; function test(p1: int32): int32; var i1: int32; begin i1:= p1; result:= p1+i1; end; begin exitcode:= test(123); end. MSElang with LLVM backend with -O3: .file test-opt.ll .text .globl main .align 16, 0x90 .type main,@function main: # @main # BB#0: movl$246, %eax ret .Ltmp0: .size main, .Ltmp0-main .section.note.GNU-stack,,@progbits FPC fixes_2_6 with -O3: .file test1.pas [...] .globl P$TEST1_TEST$LONGINT$$LONGINT .type P$TEST1_TEST$LONGINT$$LONGINT,@function P$TEST1_TEST$LONGINT$$LONGINT: # Temps allocated between esp+0 and esp+0 # Var p1 located in register edx # Var $result located in register eax # Var i1 located in register eax # [test1.pas] # [6] begin movl%eax,%edx # [7] i1:= p1; movl%edx,%eax # [8] result:= p1+i1; addl%edx,%eax # [9] end; ret [...] .globl main .type main,@function main: # Temps allocated between esp+0 and esp+0 # [11] begin callFPC_INITIALIZEUNITS # [12] exitcode:= test(123); movl$123,%eax callP$TEST1_TEST$LONGINT$$LONGINT movl%eax,operatingsystem_result # [13] end. callFPC_DO_EXIT ret [...] ;-) Martin -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk -- Julio Jiménez Borreguero -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] First comparison MSElang - FPC ;-)
LLVM calculate the result at compile time , but, for sure llvm is more powerful than fpc ;) , and llvm beat gcc too i guess -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk