[M3devel] Status of CM3

mika at async.caltech.edu mika at async.caltech.edu
Wed May 28 22:32:18 CEST 2014


All that stuff is important but sometimes you just want a fast
single-threaded parser (or whatever)...

I *think* that if I write a program using ARRAY OF CHAR and hand-code everything 
not to allocate memory, etc., I get about as good performance in native CM3 as
I used to see in PM3.  It shouldn't be any slower than C, whether that is true
or not I don't know.

It is easier to write such (old-fashioned) programs in Modula-3 than in C, which
is one of the reasons I really like this programming language...

It would be nice if the performance loss in going to TEXT (for example) were not
that great.  Partly that has to do with some of the issues you talk about (GC/locking),
of course.

Tony Hosking writes:
>
>--Apple-Mail=_0963FC1A-17A1-4B57-93C6-C196F4ECCDC1
>Content-Transfer-Encoding: quoted-printable
>Content-Type: text/plain;
>	charset=us-ascii
>
>What is really needed is some time and attention put in to bring the CM3 =
>runtime up to date with respect to advances in the field of runtime =
>systems (as witnessed by Java, Go, etc.): lightweight locking ("biased" =
>locking), cooperative GC safepoints, integration with a modern code =
>generator (LLVM!), on-the-fly GC (avoiding the need for stopping the =
>world).
>
>It would be wonderful to attack these, but they are also somewhat =
>interrelated (on-the-fly depends on per-thread safepoint handshakes, =
>biased locking requires compiler work, etc.).  So they cannot be simply =
>carved off independently.
>
>On May 28, 2014, at 2:25 PM, mika at async.caltech.edu wrote:
>
>> Jay K writes:
>>> --_af0f88f0-4e39-4643-873b-5267a8c2a602_
>> ...
>>>> B) We want to convert FreeBSD to c-backend
>>>=20
>>>=20
>>> I believe I tested FreeBSD/x86 and/or FreeBSD/amd64 with the C =
>backend.
>>> =3D20
>>> =3D20
>>> Specifically=3D2C I no longer have shelves full of a myriad of =
>computers=3D2C b=3D
>>> ut I have x86 and AMD64 VMs on a Mac readily accessible (i.e. =
>Linux=3D2C Open=3D
>>> BSD=3D2C FreeBSD=3D2C NetBSD)=3D2C I have the Solaris opencsw =
>sparc32/sparc64/x86=3D
>>> /amd64 machines=3D2C I have the Mac=3D2C I have Windows=3D2C I have =
>the Elego Deb=3D
>>> ian/amd64 maybe Debian/x86 machine and I tested many/all of these =
>successfu=3D
>>> lly. PPC/Mac can't entirely be tested on x86/Mac because Rosetta =
>doesn't of=3D
>>> fer the thread/suspend/getcontext stuff -- something cooperative =
>suspend wi=3D
>>> ll fix eventually.
>> ...
>>=20
>> I don't think the C backend is perfect.  If you want to switch
>> unconditionally, I'll have to make time to help debug it.  My fuzzy=20
>> memory, as I mentioned, is that there's some unexplained segfault.
>> Ah it was with Juno, I think.  Trestle?  Overflow in window resizing?
>> Something like that?  Ring a bell for anyone?
>>=20
>> I quite like the native backends.  The code is more compact than
>> the C backend's.  I haven't done a performance comparison... I know
>> performance of Modula-3 code has in general been sliding backwards
>> through the versions.  Things just get slower and slower and slower
>> with time.  I think it's a shame because Modula-3's niche (well the =
>one
>> I am interested in) is to be "almost the performance and simplicity of
>> C with the safety of Java (and some cool software engineering stuff)".
>> CM3 definitely compromised this, and while they added some cool new
>> features, most of them (e.g., dynamic relinking of running programs) =
>as
>> far as I know are not being used.  The work on cleaning up TEXTs has=20=
>
>> gone a ways to remedying the situation but I think there's much else.
>> Ok now I'm off on a tangent...
>>=20
>>   Mika
>
>Antony Hosking | Associate Professor | Computer Science | Purdue =
>University
>305 N. University Street | West Lafayette | IN 47907 | USA
>Mobile +1 765 427 5484
>
>
>
>
>
>
>--Apple-Mail=_0963FC1A-17A1-4B57-93C6-C196F4ECCDC1
>Content-Transfer-Encoding: quoted-printable
>Content-Type: text/html;
>	charset=us-ascii
>
><html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
>charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
>-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">What =
>is really needed is some time and attention put in to bring the CM3 =
>runtime up to date with respect to advances in the field of runtime =
>systems (as witnessed by Java, Go, etc.): lightweight locking ("biased" =
>locking), cooperative GC safepoints, integration with a modern code =
>generator (LLVM!), on-the-fly GC (avoiding the need for stopping the =
>world).<br><br>It would be wonderful to attack these, but they are also =
>somewhat interrelated (on-the-fly depends on per-thread safepoint =
>handshakes, biased locking requires compiler work, etc.).  So they =
>cannot be simply carved off independently.<br><br>On May 28, 2014, at =
>2:25 PM, <a =
>href=3D"mailto:mika at async.caltech.edu">mika at async.caltech.edu</a> =
>wrote:<br><br><blockquote type=3D"cite">Jay K writes:<br><blockquote =
>type=3D"cite">--_af0f88f0-4e39-4643-873b-5267a8c2a602_<br></blockquote>...=
><br><blockquote type=3D"cite"><blockquote type=3D"cite">B) We want to =
>convert FreeBSD to c-backend<br></blockquote><br><br>I believe I tested =
>FreeBSD/x86 and/or FreeBSD/amd64 with the C =
>backend.<br>=3D20<br>=3D20<br>Specifically=3D2C I no longer have shelves =
>full of a myriad of computers=3D2C b=3D<br>ut I have x86 and AMD64 VMs =
>on a Mac readily accessible (i.e. Linux=3D2C Open=3D<br>BSD=3D2C =
>FreeBSD=3D2C NetBSD)=3D2C I have the Solaris opencsw =
>sparc32/sparc64/x86=3D<br>/amd64 machines=3D2C I have the Mac=3D2C I =
>have Windows=3D2C I have the Elego Deb=3D<br>ian/amd64 maybe Debian/x86 =
>machine and I tested many/all of these successfu=3D<br>lly. PPC/Mac =
>can't entirely be tested on x86/Mac because Rosetta doesn't of=3D<br>fer =
>the thread/suspend/getcontext stuff -- something cooperative suspend =
>wi=3D<br>ll fix eventually.<br></blockquote>...<br><br>I don't think the =
>C backend is perfect.  If you want to switch<br>unconditionally, =
>I'll have to make time to help debug it.  My fuzzy <br>memory, as I =
>mentioned, is that there's some unexplained segfault.<br>Ah it was with =
>Juno, I think.  Trestle?  Overflow in window =
>resizing?<br>Something like that?  Ring a bell for anyone?<br><br>I =
>quite like the native backends.  The code is more compact =
>than<br>the C backend's.  I haven't done a performance =
>comparison... I know<br>performance of Modula-3 code has in general been =
>sliding backwards<br>through the versions.  Things just get slower =
>and slower and slower<br>with time.  I think it's a shame because =
>Modula-3's niche (well the one<br>I am interested in) is to be "almost =
>the performance and simplicity of<br>C with the safety of Java (and some =
>cool software engineering stuff)".<br>CM3 definitely compromised this, =
>and while they added some cool new<br>features, most of them (e.g., =
>dynamic relinking of running programs) as<br>far as I know are not being =
>used.  The work on cleaning up TEXTs has <br>gone a ways to =
>remedying the situation but I think there's much else.<br>Ok now I'm off =
>on a tangent...<br><br>   Mika<br></blockquote><br><div>
><span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
>color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; =
>font-variant: normal; font-weight: normal; letter-spacing: normal; =
>line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: =
>0px; text-transform: none; white-space: normal; widows: 2; word-spacing: =
>0px; -webkit-border-horizontal-spacing: 0px; =
>-webkit-border-vertical-spacing: 0px; =
>-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
>auto; -webkit-text-stroke-width: 0px;  "><span class=3D"Apple-style-span" =
>style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: =
>Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
>font-weight: normal; letter-spacing: normal; line-height: normal; =
>orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; =
>widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =
>-webkit-border-vertical-spacing: 0px; =
>-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
>auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: =
>break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
>after-white-space; "><span class=3D"Apple-style-span" =
>style=3D"border-collapse: separate; -webkit-border-horizontal-spacing: =
>0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); =
>font-family: Helvetica; font-size: 12px; font-style: normal; =
>font-variant: normal; font-weight: normal; letter-spacing: normal; =
>line-height: normal; -webkit-text-decorations-in-effect: none; =
>text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; =
>orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div =
>style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
>-webkit-line-break: after-white-space; "><span class=3D"Apple-style-span" =
>style=3D"border-collapse: separate; -webkit-border-horizontal-spacing: =
>0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); =
>font-family: Helvetica; font-size: 12px; font-style: normal; =
>font-variant: normal; font-weight: normal; letter-spacing: normal; =
>line-height: normal; -webkit-text-decorations-in-effect: none; =
>text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; =
>orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span =
>class=3D"Apple-style-span" style=3D"border-collapse: separate; =
>-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
>0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
>font-style: normal; font-variant: normal; font-weight: normal; =
>letter-spacing: normal; line-height: normal; =
>-webkit-text-decorations-in-effect: none; text-indent: 0px; =
>-webkit-text-size-adjust: auto; text-transform: none; orphans: 2; =
>white-space: normal; widows: 2; word-spacing: 0px; "><span =
>class=3D"Apple-style-span" style=3D"border-collapse: separate; =
>-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
>0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
>font-style: normal; font-variant: normal; font-weight: normal; =
>letter-spacing: normal; line-height: normal; =
>-webkit-text-decorations-in-effect: none; text-indent: 0px; =
>-webkit-text-size-adjust: auto; text-transform: none; orphans: 2; =
>white-space: normal; widows: 2; word-spacing: 0px; "><span =
>class=3D"Apple-style-span" style=3D"border-collapse: separate; =
>-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
>0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
>font-style: normal; font-variant: normal; font-weight: normal; =
>letter-spacing: normal; line-height: normal; =
>-webkit-text-decorations-in-effect: none; text-indent: 0px; =
>-webkit-text-size-adjust: auto; text-transform: none; orphans: 2; =
>white-space: normal; widows: 2; word-spacing: 0px; "><span =
>class=3D"Apple-style-span" style=3D"border-collapse: separate; =
>-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
>0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
>font-style: normal; font-variant: normal; font-weight: normal; =
>letter-spacing: normal; line-height: normal; =
>-webkit-text-decorations-in-effect: none; text-indent: 0px; =
>-webkit-text-size-adjust: auto; text-transform: none; orphans: 2; =
>white-space: normal; widows: 2; word-spacing: 0px; "><span =
>class=3D"Apple-style-span" style=3D"border-collapse: separate; =
>-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
>0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
>font-style: normal; font-variant: normal; font-weight: normal; =
>letter-spacing: normal; line-height: normal; =
>-webkit-text-decorations-in-effect: none; text-indent: 0px; =
>-webkit-text-size-adjust: auto; text-transform: none; orphans: 2; =
>white-space: normal; widows: 2; word-spacing: 0px; "><span =
>class=3D"Apple-style-span" style=3D"border-collapse: separate; =
>-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
>0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
>font-style: normal; font-variant: normal; font-weight: normal; =
>letter-spacing: normal; line-height: normal; =
>-webkit-text-decorations-in-effect: none; text-indent: 0px; =
>-webkit-text-size-adjust: auto; text-transform: none; orphans: 2; =
>white-space: normal; widows: 2; word-spacing: 0px; "><span =
>class=3D"Apple-style-span" style=3D"border-collapse: separate; =
>-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
>0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
>font-style: normal; font-variant: normal; font-weight: normal; =
>letter-spacing: normal; line-height: normal; =
>-webkit-text-decorations-in-effect: none; text-indent: 0px; =
>-webkit-text-size-adjust: auto; text-transform: none; orphans: 2; =
>white-space: normal; widows: 2; word-spacing: 0px; "><div><font =
>class=3D"Apple-style-span" color=3D"#0000FF"><font =
>class=3D"Apple-style-span" face=3D"Gill Sans"><span =
>class=3D"Apple-style-span" style=3D"color: rgb(0, 0, 255); font-family: =
>'Gill Sans'; "><span class=3D"Apple-style-span" style=3D"color: rgb(0, =
>0, 255); font-family: 'Gill Sans'; ">Antony =
>Hosking</span></span></font></font><font class=3D"Apple-style-span" =
>face=3D"Gill Sans"><span class=3D"Apple-style-span" style=3D"font-family: =
>'Gill Sans'; "><span class=3D"Apple-style-span" style=3D"font-family: =
>'Gill Sans'; "><span class=3D"Apple-converted-space"> </span>|<span =
>class=3D"Apple-converted-space"> </span></span></span><span =
>class=3D"Apple-style-span" style=3D"font-family: 'Gill Sans'; "><span =
>class=3D"Apple-style-span" style=3D"font-family: 'Gill Sans'; =
>">Associate Professor</span></span><span class=3D"Apple-style-span" =
>style=3D"font-family: 'Gill Sans'; "><span class=3D"Apple-style-span" =
>style=3D"font-family: 'Gill Sans'; "> | Computer Science | Purdue =
>University</span></span></font></div><div><font class=3D"Apple-style-span"=
> face=3D"GillSans-Light"><span class=3D"Apple-style-span" =
>style=3D"font-family: GillSans-Light; ">305 N. University Street | West =
>Lafayette | IN 47907 | USA</span></font></div><div><font =
>class=3D"Apple-style-span" color=3D"#0000FF" face=3D"Gill Sans"><span =
>class=3D"Apple-style-span" style=3D"color: rgb(0, 0, 255); font-family: =
>'Gill Sans'; "><span class=3D"Apple-style-span" style=3D"color: rgb(0, =
>0, 255); font-family: 'Gill Sans'; ">Mobile</span></span></font><font =
>class=3D"Apple-style-span" face=3D"GillSans-Light"><span =
>class=3D"Apple-style-span" style=3D"font-family: GillSans-Light; "><span =
>class=3D"Apple-style-span" style=3D"font-family: GillSans-Light; "><span =
>class=3D"Apple-converted-space"> </span>+1 765 427 =
>5484</span></span></font></div><div><font class=3D"Apple-style-span" =
>face=3D"GillSans-Light"><br =
>class=3D"khtml-block-placeholder"></font></div></span></span></span></span=
>></span></span></span><br =
>class=3D"Apple-interchange-newline"></span></div></span></div></span><br =
>class=3D"Apple-interchange-newline"></span><br =
>class=3D"Apple-interchange-newline">
></div>
><br></body></html>=
>
>--Apple-Mail=_0963FC1A-17A1-4B57-93C6-C196F4ECCDC1--



More information about the M3devel mailing list