* GNU Guile 2.9.1 Released [beta] @ 2018-10-10 9:31 Andy Wingo 2018-10-10 22:49 ` Mikael Djurfeldt 2018-10-20 22:30 ` Matt Wette 0 siblings, 2 replies; 5+ messages in thread From: Andy Wingo @ 2018-10-10 9:31 UTC (permalink / raw) To: guile-users; +Cc: guile-sources, guile-devel [-- Attachment #1: Type: text/plain, Size: 7516 bytes --] We are pleased to announce GNU Guile release 2.9.1. This is the first pre-release of what will eventually become the 3.0 release series. Compared to the current stable series (2.2.x), Guile 2.9.1 adds support for just-in-time native code generation, speeding up all Guile programs. See the NEWS extract at the end of the mail for full details. We encourage you to test this release and provide feedback to guile-devel@gnu.org, and to file bugs by sending mail to bug-guile@gnu.org. The Guile web page is located at http://gnu.org/software/guile/, and among other things, it contains a copy of the Guile manual and pointers to more resources. Guile is an implementation of the Scheme programming language, with support for many SRFIs, packaged for use in a wide variety of environments. In addition to implementing the R5RS Scheme standard, Guile includes a module system, full access to POSIX system calls, networking support, multiple threads, dynamic linking, a foreign function call interface, and powerful string processing. Guile can run interactively, as a script interpreter, and as a Scheme compiler to VM bytecode. It is also packaged as a library so that applications can easily incorporate a complete Scheme interpreter/VM. An application can use Guile as an extension language, a clean and powerful configuration language, or as multi-purpose "glue" to connect primitives provided by the application. It is easy to call Scheme code From C code and vice versa. Applications can add new functions, data types, control structures, and even syntax to Guile, to create a domain-specific language tailored to the task at hand. Guile 2.9.1 can be installed in parallel with Guile 2.2.x; see http://www.gnu.org/software/guile/manual/html_node/Parallel-Installations.html. A more detailed NEWS summary follows these details on how to get the Guile sources. Here are the compressed sources: http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.lz (10.3MB) http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.xz (12.3MB) http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.gz (20.8MB) Here are the GPG detached signatures[*]: http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.lz.sig http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.xz.sig http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.gz.sig Use a mirror for higher download bandwidth: http://www.gnu.org/order/ftp.html Here are the SHA256 checksums: 9e1dc7ed34a5581e47dafb920276fbb12c9c318ba432d19cb970c01aa1ab3a09 guile-2.9.1.tar.gz f24e6778e3e45ea0691b591ad7e74fdd0040689915b09ae0e52bd2a80f8e2b33 guile-2.9.1.tar.lz 01be24335d4208af3bbd0d3354d3bb66545f157959bb0c5a7cbb1a8bfd486a45 guile-2.9.1.tar.xz [*] Use a .sig file to verify that the corresponding file (without the .sig suffix) is intact. First, be sure to download both the .sig file and the corresponding tarball. Then, run a command like this: gpg --verify guile-2.9.1.tar.gz.sig If that command fails because you don't have the required public key, then run this command to import it: gpg --keyserver keys.gnupg.net --recv-keys 4FD4D288D445934E0A14F9A5A8803732E4436885 and rerun the 'gpg --verify' command. This release was bootstrapped with the following tools: Autoconf 2.69 Automake 1.16.1 Libtool 2.4.6 Gnulib v0.1-1157-gb03f418 Makeinfo 6.5 Changes in alpha 2.9.1 (since the stable 2.2 series): * Notable changes ** Just-in-time code generation Guile programs now run up to 4 times faster, relative to Guile 2.2, thanks to just-in-time (JIT) native code generation. Notably, this brings the performance of "eval" as written in Scheme back to the level of "eval" written in C, as in the days of Guile 1.8. See "Just-In-Time Native Code" in the manual, for more information. JIT compilation will be enabled automatically and transparently. To disable JIT compilation, configure Guile with `--enable-jit=no' or `--disable-jit'. The default is `--enable-jit=auto', which enables the JIT if it is available. See `./configure --help' for more. In this release, JIT compilation is enabled only on x86-64. In future prereleases support will be added for all architectures supported by GNU lightning. Intrepid users on other platforms can try passing `--enable-jit=yes' to see the state of JIT on their platform. ** Lower-level bytecode Relative to the virtual machine in Guile 2.2, Guile's VM instruction set is now more low-level. This allows it to express more advanced optimizations, for example type check elision or integer devirtualization, and makes the task of JIT code generation easier. Note that this change can mean that for a given function, the corresponding number of instructions in Guile 3.0 may be higher than Guile 2.2, which can lead to slowdowns when the function is interpreted. We hope that JIT compilation more than makes up for this slight slowdown. ** By default, GOOPS classes are not redefinable It used to be that all GOOPS classes were redefinable, at least in theory. This facility was supported by an indirection in all "struct" instances, even though only a subset of structs would need redefinition. We wanted to remove this indirection, in order to speed up Guile records, allow immutable Guile records to eventually be described by classes, and allow for some optimizations in core GOOPS classes that shouldn't be redefined anyway. Thus in GOOPS now there are classes that are redefinable and classes that aren't. By default, classes created with GOOPS are not redefinable. To make a class redefinable, it should be an instance of `<redefinable-class>'. See "Redefining a Class" in the manual for more information. * New deprecations ** scm_t_uint8, etc deprecated in favor of C99 stdint.h It used to be that Guile defined its own `scm_t_uint8' because C99 `uint8_t' wasn't widely enough available. Now Guile finally made the change to use C99 types, both internally and in Guile's public headers. Note that this also applies to SCM_T_UINT8_MAX, SCM_T_INT8_MIN, for intN and uintN for N in 8, 16, 32, and 64. Guile also now uses ptrdiff_t instead of scm_t_ptrdiff, and similarly for intmax_t, uintmax_t, intptr_t, and uintptr_t. * Incompatible changes ** All deprecated code removed All code deprecated in Guile 2.2 has been removed. See older NEWS, and check that your programs can compile without linker warnings and run without runtime warnings. See "Deprecation" in the manual. In particular, the function `scm_generalized_vector_get_handle' which was deprecated in 2.0.9 but remained in 2.2, has now finally been removed. As a replacement, use `scm_array_get_handle' to get a handle and `scm_array_handle_rank' to check the rank. ** Remove "self" field from vtables and "redefined" field from classes These fields were used as part of the machinery for class redefinition and is no longer needed. ** VM hook manipulation simplified The low-level mechanism to instrument a running virtual machine for debugging and tracing has been simplified. See "VM Hooks" in the manual, for more. * Changes to the distribution ** New effective version The "effective version" of Guile is now 3.0, which allows parallel installation with other effective versions (for example, the older Guile 2.2). See "Parallel Installations" in the manual for full details. Notably, the `pkg-config' file is now `guile-3.0'. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GNU Guile 2.9.1 Released [beta] 2018-10-10 9:31 GNU Guile 2.9.1 Released [beta] Andy Wingo @ 2018-10-10 22:49 ` Mikael Djurfeldt 2018-10-10 22:55 ` Mikael Djurfeldt 2018-10-11 11:37 ` Mikael Djurfeldt 2018-10-20 22:30 ` Matt Wette 1 sibling, 2 replies; 5+ messages in thread From: Mikael Djurfeldt @ 2018-10-10 22:49 UTC (permalink / raw) To: Andy Wingo; +Cc: guile-users, guile-devel [-- Attachment #1.1: Type: text/plain, Size: 8455 bytes --] Congratulations to fantastic work! I wonder if your evaluator speed estimates aren't too humble? With this email, I attach scheme and python versions of a (maybe buggy---just wrote it) algorithm for finding Ramanujan numbers. It's essentially the same algorithm for both languages, although Scheme invites you to write in a more functional style (which involves more function calls, which shouldn't give Guile any advantage over Python performance wise). I did the following 5 times and took the median of the real time used: time guile -l ramanujan.scm -c '(ramanujan 20)' time python3 -c 'from ramanujan import *; ramanujan(20)' Results (s): guile-1.8: 7.03 guile-2.9.1: 0.91 python-3.5.3: 3.78 Best regards, Mikael D. On Wed, Oct 10, 2018 at 11:32 AM Andy Wingo <wingo@pobox.com> wrote: > We are pleased to announce GNU Guile release 2.9.1. This is the first > pre-release of what will eventually become the 3.0 release series. > > Compared to the current stable series (2.2.x), Guile 2.9.1 adds support > for just-in-time native code generation, speeding up all Guile programs. > See the NEWS extract at the end of the mail for full details. > > We encourage you to test this release and provide feedback to > guile-devel@gnu.org, and to file bugs by sending mail to > bug-guile@gnu.org. > > The Guile web page is located at http://gnu.org/software/guile/, and > among other things, it contains a copy of the Guile manual and pointers > to more resources. > > Guile is an implementation of the Scheme programming language, with > support for many SRFIs, packaged for use in a wide variety of > environments. In addition to implementing the R5RS Scheme standard, > Guile includes a module system, full access to POSIX system calls, > networking support, multiple threads, dynamic linking, a foreign > function call interface, and powerful string processing. > > Guile can run interactively, as a script interpreter, and as a Scheme > compiler to VM bytecode. It is also packaged as a library so that > applications can easily incorporate a complete Scheme interpreter/VM. > An application can use Guile as an extension language, a clean and > powerful configuration language, or as multi-purpose "glue" to connect > primitives provided by the application. It is easy to call Scheme code > From C code and vice versa. Applications can add new functions, data > types, control structures, and even syntax to Guile, to create a > domain-specific language tailored to the task at hand. > > Guile 2.9.1 can be installed in parallel with Guile 2.2.x; see > > http://www.gnu.org/software/guile/manual/html_node/Parallel-Installations.html > . > > A more detailed NEWS summary follows these details on how to get the > Guile sources. > > Here are the compressed sources: > http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.lz (10.3MB) > http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.xz (12.3MB) > http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.gz (20.8MB) > > Here are the GPG detached signatures[*]: > http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.lz.sig > http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.xz.sig > http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.gz.sig > > Use a mirror for higher download bandwidth: > http://www.gnu.org/order/ftp.html > > Here are the SHA256 checksums: > > 9e1dc7ed34a5581e47dafb920276fbb12c9c318ba432d19cb970c01aa1ab3a09 > guile-2.9.1.tar.gz > f24e6778e3e45ea0691b591ad7e74fdd0040689915b09ae0e52bd2a80f8e2b33 > guile-2.9.1.tar.lz > 01be24335d4208af3bbd0d3354d3bb66545f157959bb0c5a7cbb1a8bfd486a45 > guile-2.9.1.tar.xz > > [*] Use a .sig file to verify that the corresponding file (without the > .sig suffix) is intact. First, be sure to download both the .sig file > and the corresponding tarball. Then, run a command like this: > > gpg --verify guile-2.9.1.tar.gz.sig > > If that command fails because you don't have the required public key, > then run this command to import it: > > gpg --keyserver keys.gnupg.net --recv-keys > 4FD4D288D445934E0A14F9A5A8803732E4436885 > > and rerun the 'gpg --verify' command. > > This release was bootstrapped with the following tools: > Autoconf 2.69 > Automake 1.16.1 > Libtool 2.4.6 > Gnulib v0.1-1157-gb03f418 > Makeinfo 6.5 > > > Changes in alpha 2.9.1 (since the stable 2.2 series): > > * Notable changes > > ** Just-in-time code generation > > Guile programs now run up to 4 times faster, relative to Guile 2.2, > thanks to just-in-time (JIT) native code generation. Notably, this > brings the performance of "eval" as written in Scheme back to the level > of "eval" written in C, as in the days of Guile 1.8. > > See "Just-In-Time Native Code" in the manual, for more information. JIT > compilation will be enabled automatically and transparently. To disable > JIT compilation, configure Guile with `--enable-jit=no' or > `--disable-jit'. The default is `--enable-jit=auto', which enables the > JIT if it is available. See `./configure --help' for more. > > In this release, JIT compilation is enabled only on x86-64. In future > prereleases support will be added for all architectures supported by GNU > lightning. Intrepid users on other platforms can try passing > `--enable-jit=yes' to see the state of JIT on their platform. > > ** Lower-level bytecode > > Relative to the virtual machine in Guile 2.2, Guile's VM instruction set > is now more low-level. This allows it to express more advanced > optimizations, for example type check elision or integer > devirtualization, and makes the task of JIT code generation easier. > > Note that this change can mean that for a given function, the > corresponding number of instructions in Guile 3.0 may be higher than > Guile 2.2, which can lead to slowdowns when the function is interpreted. > We hope that JIT compilation more than makes up for this slight > slowdown. > > ** By default, GOOPS classes are not redefinable > > It used to be that all GOOPS classes were redefinable, at least in > theory. This facility was supported by an indirection in all "struct" > instances, even though only a subset of structs would need redefinition. > We wanted to remove this indirection, in order to speed up Guile > records, allow immutable Guile records to eventually be described by > classes, and allow for some optimizations in core GOOPS classes that > shouldn't be redefined anyway. > > Thus in GOOPS now there are classes that are redefinable and classes > that aren't. By default, classes created with GOOPS are not > redefinable. To make a class redefinable, it should be an instance of > `<redefinable-class>'. See "Redefining a Class" in the manual for more > information. > > * New deprecations > > ** scm_t_uint8, etc deprecated in favor of C99 stdint.h > > It used to be that Guile defined its own `scm_t_uint8' because C99 > `uint8_t' wasn't widely enough available. Now Guile finally made the > change to use C99 types, both internally and in Guile's public headers. > > Note that this also applies to SCM_T_UINT8_MAX, SCM_T_INT8_MIN, for intN > and uintN for N in 8, 16, 32, and 64. Guile also now uses ptrdiff_t > instead of scm_t_ptrdiff, and similarly for intmax_t, uintmax_t, > intptr_t, and uintptr_t. > > * Incompatible changes > > ** All deprecated code removed > > All code deprecated in Guile 2.2 has been removed. See older NEWS, and > check that your programs can compile without linker warnings and run > without runtime warnings. See "Deprecation" in the manual. > > In particular, the function `scm_generalized_vector_get_handle' which > was deprecated in 2.0.9 but remained in 2.2, has now finally been > removed. As a replacement, use `scm_array_get_handle' to get a handle > and `scm_array_handle_rank' to check the rank. > > ** Remove "self" field from vtables and "redefined" field from classes > > These fields were used as part of the machinery for class redefinition > and is no longer needed. > > ** VM hook manipulation simplified > > The low-level mechanism to instrument a running virtual machine for > debugging and tracing has been simplified. See "VM Hooks" in the > manual, for more. > > * Changes to the distribution > > ** New effective version > > The "effective version" of Guile is now 3.0, which allows parallel > installation with other effective versions (for example, the older Guile > 2.2). See "Parallel Installations" in the manual for full details. > Notably, the `pkg-config' file is now `guile-3.0'. > [-- Attachment #1.2: Type: text/html, Size: 10785 bytes --] [-- Attachment #2: ramanujan.scm --] [-- Type: text/x-scheme, Size: 1740 bytes --] ;;;; ramanujan.scm -- Compute the N:th Ramanujan number ;;;; ;;;; Copyright (C) 2018 Mikael Djurfeldt ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by ;;;; the Free Software Foundation; either version 3, or (at your option) ;;;; any later version. ;;;; ;;;; This program is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;;; GNU General Public License for more details. ;;;; ;;;; You should have received a copy of the GNU General Public License ;;;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;;;; \f (define (ramanujan n) "Return the N:th Ramanujan number (sum of two cubes in more than one way)" (define (ramanujan? w b0) ;; Is w a Ramanujan number? (let loop ((a 1) (b b0) (count 0)) (or (> count 1) (and (<= a b) (let ((s (+ (* a a a) (* b b b)))) (cond ((< s w) (loop (+ 1 a) b count)) ; too small => inc a ((> s w) (loop a (- b 1) count)) ; too large => dec b (else (loop a (- b 1) (+ 1 count))))))))) ; found a sum! (define (iter w b0 n) ;; w is a Ramanujan candidate ;; b0 is the first second term to try ;; n is the number of Ramanujan number still to find ;; We first increase b0 until 1 + b0^3 > w (let ((b0 (let loop ((b b0)) (if (>= (+ 1 (* b b b)) w) b (loop (+ 1 b)))))) (cond ((zero? n) (- w 1)) ; found the last number! ((ramanujan? w b0) (iter (+ 1 w) b0 (- n 1))) (else (iter (+ 1 w) b0 n))))) ; try next candidate (iter 2 1 n)) [-- Attachment #3: ramanujan.py --] [-- Type: text/x-python, Size: 1598 bytes --] #!/usr/bin/python3 # ramanujan.py -- Compute the N:th Ramanujan number # # Copyright (C) 2018 Mikael Djurfeldt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # return the N:th Ramanujan number (sum of two cubes in more than one way) # def ramanujan (n): w = 0 # Ramanujan number candidate b0 = 1 # first second term to try while n > 0: w += 1 # try next candidate # increase initial b0 until 1 + b0^3 > w while 1 + b0 * b0 * b0 < w: b0 += 1 a = 1 b = b0 count = 0 # number of ways to write w while a <= b: s = a * a * a + b * b * b if s < w: a += 1 # if sum is too small, increase a continue elif s == w: count += 1 # found a sum! if count > 1: n -= 1 break b -= 1 # increase b both if sum too large and to find next way to write w return w ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GNU Guile 2.9.1 Released [beta] 2018-10-10 22:49 ` Mikael Djurfeldt @ 2018-10-10 22:55 ` Mikael Djurfeldt 2018-10-11 11:37 ` Mikael Djurfeldt 1 sibling, 0 replies; 5+ messages in thread From: Mikael Djurfeldt @ 2018-10-10 22:55 UTC (permalink / raw) To: Andy Wingo; +Cc: guile-devel [-- Attachment #1: Type: text/plain, Size: 9067 bytes --] Then a bug report: I find that there seems to be some kind of racing condition such that the guile-2.9.1 timing line below sometimes gives segmentation fault. I'm sorry that I don't have time to look further into that right now, and hope that someone else also can reproduce it. Best regards, Mikael On Thu, Oct 11, 2018 at 12:49 AM Mikael Djurfeldt <mikael@djurfeldt.com> wrote: > Congratulations to fantastic work! > > I wonder if your evaluator speed estimates aren't too humble? > > With this email, I attach scheme and python versions of a (maybe > buggy---just wrote it) algorithm for finding Ramanujan numbers. It's > essentially the same algorithm for both languages, although Scheme invites > you to write in a more functional style (which involves more function > calls, which shouldn't give Guile any advantage over Python performance > wise). > > I did the following 5 times and took the median of the real time used: > > time guile -l ramanujan.scm -c '(ramanujan 20)' > time python3 -c 'from ramanujan import *; ramanujan(20)' > > Results (s): > > guile-1.8: 7.03 > guile-2.9.1: 0.91 > python-3.5.3: 3.78 > > Best regards, > Mikael D. > > On Wed, Oct 10, 2018 at 11:32 AM Andy Wingo <wingo@pobox.com> wrote: > >> We are pleased to announce GNU Guile release 2.9.1. This is the first >> pre-release of what will eventually become the 3.0 release series. >> >> Compared to the current stable series (2.2.x), Guile 2.9.1 adds support >> for just-in-time native code generation, speeding up all Guile programs. >> See the NEWS extract at the end of the mail for full details. >> >> We encourage you to test this release and provide feedback to >> guile-devel@gnu.org, and to file bugs by sending mail to >> bug-guile@gnu.org. >> >> The Guile web page is located at http://gnu.org/software/guile/, and >> among other things, it contains a copy of the Guile manual and pointers >> to more resources. >> >> Guile is an implementation of the Scheme programming language, with >> support for many SRFIs, packaged for use in a wide variety of >> environments. In addition to implementing the R5RS Scheme standard, >> Guile includes a module system, full access to POSIX system calls, >> networking support, multiple threads, dynamic linking, a foreign >> function call interface, and powerful string processing. >> >> Guile can run interactively, as a script interpreter, and as a Scheme >> compiler to VM bytecode. It is also packaged as a library so that >> applications can easily incorporate a complete Scheme interpreter/VM. >> An application can use Guile as an extension language, a clean and >> powerful configuration language, or as multi-purpose "glue" to connect >> primitives provided by the application. It is easy to call Scheme code >> From C code and vice versa. Applications can add new functions, data >> types, control structures, and even syntax to Guile, to create a >> domain-specific language tailored to the task at hand. >> >> Guile 2.9.1 can be installed in parallel with Guile 2.2.x; see >> >> http://www.gnu.org/software/guile/manual/html_node/Parallel-Installations.html >> . >> >> A more detailed NEWS summary follows these details on how to get the >> Guile sources. >> >> Here are the compressed sources: >> http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.lz (10.3MB) >> http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.xz (12.3MB) >> http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.gz (20.8MB) >> >> Here are the GPG detached signatures[*]: >> http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.lz.sig >> http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.xz.sig >> http://alpha.gnu.org/gnu/guile/guile-2.9.1.tar.gz.sig >> >> Use a mirror for higher download bandwidth: >> http://www.gnu.org/order/ftp.html >> >> Here are the SHA256 checksums: >> >> 9e1dc7ed34a5581e47dafb920276fbb12c9c318ba432d19cb970c01aa1ab3a09 >> guile-2.9.1.tar.gz >> f24e6778e3e45ea0691b591ad7e74fdd0040689915b09ae0e52bd2a80f8e2b33 >> guile-2.9.1.tar.lz >> 01be24335d4208af3bbd0d3354d3bb66545f157959bb0c5a7cbb1a8bfd486a45 >> guile-2.9.1.tar.xz >> >> [*] Use a .sig file to verify that the corresponding file (without the >> .sig suffix) is intact. First, be sure to download both the .sig file >> and the corresponding tarball. Then, run a command like this: >> >> gpg --verify guile-2.9.1.tar.gz.sig >> >> If that command fails because you don't have the required public key, >> then run this command to import it: >> >> gpg --keyserver keys.gnupg.net --recv-keys >> 4FD4D288D445934E0A14F9A5A8803732E4436885 >> >> and rerun the 'gpg --verify' command. >> >> This release was bootstrapped with the following tools: >> Autoconf 2.69 >> Automake 1.16.1 >> Libtool 2.4.6 >> Gnulib v0.1-1157-gb03f418 >> Makeinfo 6.5 >> >> >> Changes in alpha 2.9.1 (since the stable 2.2 series): >> >> * Notable changes >> >> ** Just-in-time code generation >> >> Guile programs now run up to 4 times faster, relative to Guile 2.2, >> thanks to just-in-time (JIT) native code generation. Notably, this >> brings the performance of "eval" as written in Scheme back to the level >> of "eval" written in C, as in the days of Guile 1.8. >> >> See "Just-In-Time Native Code" in the manual, for more information. JIT >> compilation will be enabled automatically and transparently. To disable >> JIT compilation, configure Guile with `--enable-jit=no' or >> `--disable-jit'. The default is `--enable-jit=auto', which enables the >> JIT if it is available. See `./configure --help' for more. >> >> In this release, JIT compilation is enabled only on x86-64. In future >> prereleases support will be added for all architectures supported by GNU >> lightning. Intrepid users on other platforms can try passing >> `--enable-jit=yes' to see the state of JIT on their platform. >> >> ** Lower-level bytecode >> >> Relative to the virtual machine in Guile 2.2, Guile's VM instruction set >> is now more low-level. This allows it to express more advanced >> optimizations, for example type check elision or integer >> devirtualization, and makes the task of JIT code generation easier. >> >> Note that this change can mean that for a given function, the >> corresponding number of instructions in Guile 3.0 may be higher than >> Guile 2.2, which can lead to slowdowns when the function is interpreted. >> We hope that JIT compilation more than makes up for this slight >> slowdown. >> >> ** By default, GOOPS classes are not redefinable >> >> It used to be that all GOOPS classes were redefinable, at least in >> theory. This facility was supported by an indirection in all "struct" >> instances, even though only a subset of structs would need redefinition. >> We wanted to remove this indirection, in order to speed up Guile >> records, allow immutable Guile records to eventually be described by >> classes, and allow for some optimizations in core GOOPS classes that >> shouldn't be redefined anyway. >> >> Thus in GOOPS now there are classes that are redefinable and classes >> that aren't. By default, classes created with GOOPS are not >> redefinable. To make a class redefinable, it should be an instance of >> `<redefinable-class>'. See "Redefining a Class" in the manual for more >> information. >> >> * New deprecations >> >> ** scm_t_uint8, etc deprecated in favor of C99 stdint.h >> >> It used to be that Guile defined its own `scm_t_uint8' because C99 >> `uint8_t' wasn't widely enough available. Now Guile finally made the >> change to use C99 types, both internally and in Guile's public headers. >> >> Note that this also applies to SCM_T_UINT8_MAX, SCM_T_INT8_MIN, for intN >> and uintN for N in 8, 16, 32, and 64. Guile also now uses ptrdiff_t >> instead of scm_t_ptrdiff, and similarly for intmax_t, uintmax_t, >> intptr_t, and uintptr_t. >> >> * Incompatible changes >> >> ** All deprecated code removed >> >> All code deprecated in Guile 2.2 has been removed. See older NEWS, and >> check that your programs can compile without linker warnings and run >> without runtime warnings. See "Deprecation" in the manual. >> >> In particular, the function `scm_generalized_vector_get_handle' which >> was deprecated in 2.0.9 but remained in 2.2, has now finally been >> removed. As a replacement, use `scm_array_get_handle' to get a handle >> and `scm_array_handle_rank' to check the rank. >> >> ** Remove "self" field from vtables and "redefined" field from classes >> >> These fields were used as part of the machinery for class redefinition >> and is no longer needed. >> >> ** VM hook manipulation simplified >> >> The low-level mechanism to instrument a running virtual machine for >> debugging and tracing has been simplified. See "VM Hooks" in the >> manual, for more. >> >> * Changes to the distribution >> >> ** New effective version >> >> The "effective version" of Guile is now 3.0, which allows parallel >> installation with other effective versions (for example, the older Guile >> 2.2). See "Parallel Installations" in the manual for full details. >> Notably, the `pkg-config' file is now `guile-3.0'. >> > [-- Attachment #2: Type: text/html, Size: 11487 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GNU Guile 2.9.1 Released [beta] 2018-10-10 22:49 ` Mikael Djurfeldt 2018-10-10 22:55 ` Mikael Djurfeldt @ 2018-10-11 11:37 ` Mikael Djurfeldt 1 sibling, 0 replies; 5+ messages in thread From: Mikael Djurfeldt @ 2018-10-11 11:37 UTC (permalink / raw) To: Andy Wingo; +Cc: guile-devel [-- Attachment #1.1: Type: text/plain, Size: 706 bytes --] I improved the benchmarking code by reducing the number of cube computations. Interestingly, this gives a huge improvement of guile-2.9.1 performance while improving less or even worsening performance for other scheme interpreters I've tested. This could indicate that 1. the guile-2.9.1 optimizer is able to convert the extra code I introduced to avoid unnecessary cube computation (let:s and extra args) to something with low overhead 2. guile-2.9.1 arithmetic is a bit heavy Anyhow, now guile-1.8 went up to 7.53 s, guile-2.9.1 went down to 0.53 s while python went down to 3.60 s. Attaching version 2 of the benchmarks. (BTW, on my machine the previous version is better at provoking a segfault.) [-- Attachment #1.2: Type: text/html, Size: 824 bytes --] [-- Attachment #2: ramanujan.scm --] [-- Type: text/x-scheme, Size: 1866 bytes --] ;;;; ramanujan.scm -- Compute the N:th Ramanujan number ;;;; ;;;; Copyright (C) 2018 Mikael Djurfeldt ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by ;;;; the Free Software Foundation; either version 3, or (at your option) ;;;; any later version. ;;;; ;;;; This program is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;;; GNU General Public License for more details. ;;;; ;;;; You should have received a copy of the GNU General Public License ;;;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;;;; \f ;;; Version 2 (define (ramanujan n) "Return the N:th Ramanujan number (sum of two cubes in more than one way)" (define (ramanujan? w b0) ;; Is w a Ramanujan number? (let loop ((a 1) (a3 1) (b b0) (b3 (* b0 b0 b0)) (seen #f)) (and (<= a b) (let ((s (+ a3 b3))) (cond ((< s w) (let ((a1 (+ 1 a))) ; too small => inc a (loop a1 (* a1 a1 a1) b b3 seen))) ((> s w) (let ((b1 (- b 1))) ; too large => dec b (loop a a3 b1 (* b1 b1 b1) seen))) (else (let ((b1 (- b 1))) ; found a sum! (or seen (loop a a3 b1 (* b1 b1 b1) #t))))))))) (define (iter w b0 n) ;; w is a Ramanujan candidate ;; b0 is the first second term to try ;; n is the number of Ramanujan number still to find ;; We first increase b0 until 1 + b0^3 >= w (let ((b0 (let loop ((b b0)) (if (>= (+ 1 (* b b b)) w) b (loop (+ 1 b)))))) (cond ((zero? n) (- w 1)) ; found the last number! ((ramanujan? w b0) (iter (+ 1 w) b0 (- n 1))) (else (iter (+ 1 w) b0 n))))) ; try next candidate (iter 2 1 n)) [-- Attachment #3: ramanujan.py --] [-- Type: text/x-python, Size: 1696 bytes --] #!/usr/bin/python3 # ramanujan.py -- Compute the N:th Ramanujan number # # Copyright (C) 2018 Mikael Djurfeldt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # Version 2 # return the N:th Ramanujan number (sum of two cubes in more than one way) # def ramanujan (n): w = 0 # Ramanujan number candidate b0 = 1 # first second term to try while n > 0: w += 1 # try next candidate # increase initial b0 until 1 + b0^3 >=w while 1 + b0 * b0 * b0 < w: b0 += 1 a = 1 a3 = 1 b = b0 b3 = b0 * b0 * b0 count = 0 # number of ways to write w while a <= b: s = a3 + b3 if s < w: a += 1 # if sum is too small, increase a a3 = a * a * a continue elif s == w: count += 1 # found a sum! if count > 1: n -= 1 break b -= 1 # increase b both if sum too large and to find next way to write w b3 = b * b * b return w ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GNU Guile 2.9.1 Released [beta] 2018-10-10 9:31 GNU Guile 2.9.1 Released [beta] Andy Wingo 2018-10-10 22:49 ` Mikael Djurfeldt @ 2018-10-20 22:30 ` Matt Wette 1 sibling, 0 replies; 5+ messages in thread From: Matt Wette @ 2018-10-20 22:30 UTC (permalink / raw) To: guile-devel On 10/10/18 2:31 AM, Andy Wingo wrote: > We are pleased to announce GNU Guile release 2.9.1. This is the first > pre-release of what will eventually become the 3.0 release series. > configure, make, check all worked for me on macOS 10.12.6 (w/ gcc 7.3) ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-20 22:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-10-10 9:31 GNU Guile 2.9.1 Released [beta] Andy Wingo 2018-10-10 22:49 ` Mikael Djurfeldt 2018-10-10 22:55 ` Mikael Djurfeldt 2018-10-11 11:37 ` Mikael Djurfeldt 2018-10-20 22:30 ` Matt Wette
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).