Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #40384
| Path | csiph.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!feeder1.feed.usenet.farm!feed.usenet.farm!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Mostowski Collapse <janburse@fastmail.fm> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) |
| Date | Wed, 15 Sep 2021 18:49:06 +0200 |
| Message-ID | <sht860$8mn$1@solani.org> (permalink) |
| References | <s6n47e$k2i$1@solani.org> <shnpjj$kq$1@solani.org> <shsuur$88u$6@solani.org> <774928ca-dfdf-44a3-aca2-b8adc859a953n@googlegroups.com> <ee650024-3f93-49a6-a482-8bc4c670f53bn@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Wed, 15 Sep 2021 16:49:04 -0000 (UTC) |
| Injection-Info | solani.org; logging-data="8919"; mail-complaints-to="abuse@news.solani.org" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.9 |
| Cancel-Lock | sha1:WkWmBj+iwIxDT9ohajY8pBx7qIM= |
| In-Reply-To | <ee650024-3f93-49a6-a482-8bc4c670f53bn@googlegroups.com> |
| X-User-ID | eJwFwQkBwDAIA0BL0BBW5PAU/xJ2R7h6f+Z043ItWI0KmcGsSOmIGe+RyFx/QEeib/mM5DmKCGohHz2j5gdVlhWr |
| Xref | csiph.com comp.lang.javascript:40384 |
Show key headers only | View raw
I am having a cross language problem. I really wonder why my Python implementation is a factor 40 slower than my JavaScript implementation. Structurally its the same code. You can check yourself: Python Version: https://github.com/jburse/dogelog-moon/blob/main/devel/runtimepy/machine.py JavaScript Version: https://github.com/jburse/dogelog-moon/blob/main/devel/runtime/machine.js Its the same while, if-then-else, etc.. its the same classes Variable, Compound etc.. Maybe I could speed it up by some details. For example to create an array of length n, I use in Python: temp = [NotImplemented] * code[pos] pos += 1 Whereas in JavaScript I use, also in exec_build2(): temp = new Array(code[pos++]); So I hear Guido doesn't like ++. So in Python I use += and a separate statement as a workaround. But otherwise, what about the creation of an array, is the the idiom [_] * _ slow? I am assuming its compiled away. Or does it really first create an array of size 1 and then enlarge it? Julio Di Egidio wrote: > On Wednesday, 15 September 2021 at 17:46:15 UTC+2, Julio Di Egidio wrote: >> On Wednesday, 15 September 2021 at 16:11:48 UTC+2, Mostowski Collapse wrote: >> >>>> Opinion: Anyone who is counting on Python for truly fast compute >>> speed is probably using Python for the wrong purpose. >> You just don't know anything about this environment: those who need fast computation rather use *libraries* where all the performance critical parts are written in native code... and that's pretty customary in Python. >> >> That doesn't mean Python is flawless, indeed (IMO) it isn't in so many ways: to the point that, for more professional solutions in the maths/statistics realms in particular, people rather use R: yet, the primary reason is not so not so much performance but really the solidity/structure of the language per se... > > Good grief, I thought we were in comp-lang-python... You are indeed just *off-topic* here: I mean, an announcement for a JS-based engine is welcome, but you posting your Python implementation diary in this group is as off-topic as it can be. > > *Plonk* > > Julio >
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <janburse@fastmail.fm> - 2021-05-02 23:05 +0200
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mina Arvuti lähedal <ya12983@mail.com> - 2021-05-25 18:44 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <janburse@fastmail.fm> - 2021-06-09 14:59 +0200
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-06-12 16:59 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-06-12 17:01 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-06-17 01:45 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <janburse@fastmail.fm> - 2021-06-23 14:57 +0200
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-06-25 04:00 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-06-25 05:02 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-07-10 16:50 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-07-12 01:04 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-08-02 09:48 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-08-11 08:28 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-08-12 10:40 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-08-12 10:42 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-08-14 06:04 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-09-02 09:38 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-09-05 05:13 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <janburse@fastmail.fm> - 2021-09-13 17:09 +0200
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <janburse@fastmail.fm> - 2021-09-15 16:11 +0200
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Julio Di Egidio <julio@diegidio.name> - 2021-09-15 08:46 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Julio Di Egidio <julio@diegidio.name> - 2021-09-15 08:49 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <janburse@fastmail.fm> - 2021-09-15 18:49 +0200
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-09-16 13:27 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-09-16 14:48 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-09-19 13:28 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) John Harris <niam@jghnorth.org.uk.invalid> - 2021-09-20 18:11 +0100
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-09-20 11:04 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-09-20 15:16 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-09-23 09:19 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-09-23 09:39 -0700
Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) Mostowski Collapse <bursejan@gmail.com> - 2021-09-24 06:19 -0700
csiph-web