unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Python-on-guile
@ 2021-04-23 15:00 Mikael Djurfeldt
  2021-04-23 20:41 ` Python-on-guile Linus Björnstam
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Mikael Djurfeldt @ 2021-04-23 15:00 UTC (permalink / raw)
  To: guile-user, guile-devel

Hi,

Yesterday, Andy committed new code to the compiler, some of which concerned
skipping some arity checking.

Also, Stefan meanwhile committed something called "reworked object system"
to his python-on-guile.

Sorry for coming with unspecific information (don't have time to track down
the details) but I noticed that my benchmark script written in Python, and
which computes the 20:th Ramanujan number, now runs 60% faster than before
these changes.

This means that python-on-guile running on guile3 master executes python
code only 2.6 times slower than the CPython python3 interpreter itself. :-)

Have a nice weekend all,
Mikael


^ permalink raw reply	[flat|nested] 18+ messages in thread
* python-on-guile
@ 2022-02-19 19:36 Stefan Israelsson Tampe
  0 siblings, 0 replies; 18+ messages in thread
From: Stefan Israelsson Tampe @ 2022-02-19 19:36 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 1582 bytes --]

i am now experimenting with the new generator infrastructure to see how
much actual python on guile code is sped up. In the process I am optimizing
a lot of stuff regarding python for loops. But some irritating things
remain.

My number 1 anger is that a iterator can throw an exception as a way to end
a loop. And then at a final step all loop data has to be available so in a
functional style you now need to have the catch frame that is internal.
Currently we have the cludge of wither use known safe iterations, like over
a list of values or a range or a known safe generator. More general code
needs to play with a pletoria of set! actions in order to transfer data out
of scope. Horrible!!!

But what about this solution just make a generator that returns all values
so that you can keep track of em and just issue the finishing command with
it.

(define internalGenerator
    (lambda ()
         (pause)
         (catch 'StopIteration
                (lambda ()
                     (let lp ((s s0) ...)
                        (return x ... s ...)
                         (let ((xx (next I)) ...)
                              (let ((x xx) ...)

                                  code ...
                                  (lp snew ...))))
                       (return 'finished)
                  (lambda xxx (return 'finished))))))

We know that the generator over head in the loop is quite small just 3-4x
the speediest loop guile perform. with this we get non set! operations that
are very performant. But not only this we might get continue to work
speedily as well

[-- Attachment #2: Type: text/html, Size: 2220 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread
* python-on-guile
@ 2019-06-14 18:06 Stefan Israelsson Tampe
  2019-06-22 21:07 ` python-on-guile Arne Babenhauserheide
  2019-06-26 18:45 ` python-on-guile Nala Ginrut
  0 siblings, 2 replies; 18+ messages in thread
From: Stefan Israelsson Tampe @ 2019-06-14 18:06 UTC (permalink / raw)
  To: guile-devel, Guile User

[-- Attachment #1: Type: text/plain, Size: 519 bytes --]

python on guile has reached quite far and now compiles a lot of the
standard python code base. The speed has not been of importance. Rather to
get good coopertion between guile scheme and python programs.

But it also define a scheme interface to the python functionalites and i'm
now trying to compile some documentation of this inteface. You can find
docs at http://www.c-lambda.se/python-on-guile.

source code is at,
https://gitlab.com/python-on-guile/python-on-guile/

This is a work in progress.

Happy hacking!!

[-- Attachment #2: Type: text/html, Size: 775 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-02-19 19:36 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 15:00 Python-on-guile Mikael Djurfeldt
2021-04-23 20:41 ` Python-on-guile Linus Björnstam
2021-04-24 10:04 ` Python-on-guile Mikael Djurfeldt
2021-04-24 11:26   ` Python-on-guile Stefan Israelsson Tampe
2021-04-24 12:59     ` Python-on-guile Stefan Israelsson Tampe
2021-04-24 14:41       ` Python-on-guile Stefan Israelsson Tampe
2021-04-24 15:19         ` Python-on-guile Stefan Israelsson Tampe
2021-04-25  8:20           ` Python-on-guile Mikael Djurfeldt
2021-04-25 10:21             ` Python-on-guile Stefan Israelsson Tampe
2021-04-25  8:46           ` Python-on-guile Stefan Israelsson Tampe
2021-04-25 10:54       ` Python-on-guile Dr. Arne Babenhauserheide
2021-04-25 11:54         ` Python-on-guile Vivien Kraus via General Guile related discussions
2021-04-25 10:18 ` Python-on-guile Stefan Israelsson Tampe
2021-04-27 12:29 ` Python-on-guile Nala Ginrut
  -- strict thread matches above, loose matches on Subject: below --
2022-02-19 19:36 python-on-guile Stefan Israelsson Tampe
2019-06-14 18:06 python-on-guile Stefan Israelsson Tampe
2019-06-22 21:07 ` python-on-guile Arne Babenhauserheide
2019-06-26 18:45 ` python-on-guile Nala Ginrut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).