Browse files

Update recent changes

  • Loading branch information...
1 parent 3fc61aa commit 18c5758ca3f308fec9ebb1c64806e805d7d56694 @rurban committed Oct 4, 2012
Showing with 43 additions and 3 deletions.
  1. +4 −1 Changes
  2. +2 −2 Todo
  3. +37 −0 ramblings/
5 Changes
@@ -38,7 +38,10 @@
Fixed Null COP storage for 5.16 and 5.17
amagic_generation was removed with 5.17
Fixed $$ ($PID) to be dynamic, issue 108. Thanks to flexvault for reporting this.
- * CC (1.13): added check_entersub, check_bless - bless and new caching
+ Fixed double precision to 16 digits. The nbody shootout test passes now
+ * CC (1.13): added check_entersub, check_bless - bless and new caching.
+ Use the B::C integer and double precision logic (ivx, nvx).
+ Fixed double precision to 16 digits. The nbody shootout is now 2x faster than perl
* Bytecode (1.14): fixed require and op_first, issue 97
Fixed regex_pad offset in threaded perls >= 5.11, issue 68
* t/perldoc.t: perlcc fails with 5.8 because Cwd disturbs the
4 Todo
@@ -15,15 +15,14 @@ allocation of XPV[INAHC]V structures needs fixing: Perl tries to free
list the same as X[IPR]V structures.
ref counts
perl_parse replacement
-NV overflow initialisation analog to ivx (ExtUtils::CBuilder)
CvOUTSIDE for ordinary subs
* Features
Detect ExtUtils::Constant autoloaded "Your vendor has not defined"
functions stubs. E.g. "WARNING: &Socket::AF_DATAKIT not found"
optimize static or typed method calls.
-detect typed objects (my Class $obj = new Class;)
+detect typed objects (my Class $obj = new Class;) (partially done)
modularize (-m) for faster link times
BEGIN goto optim: skip code after BEGIN goto
usually Carp including B in some AUTOLOAD block, issue 61
@@ -52,3 +51,4 @@ demand-loaded bytecode (leader of each basic block replaced by an op
which loads in bytecode for its block)
fast sub calls for CC backend
tailcall optimization (entersub -> leavesub => goto)
+inline functions and methods
37 ramblings/
@@ -465,3 +465,40 @@ optimized.
for (1..$n){
+Increasing precision
+The casual reader might have noticed that the compiler result would
+not pass the shootout precision tests as it produced an invalid
+Wanted: +-1e-8 with arg 1000
+ -0.169075164
+ -0.169087605
+Have: with arg 1000
+ -0.169075214
+ -0.169087656
+That's not even close, it's a 6 digit precision. The perl afficionado
+might remember the Config settings `nvgformat` to print out NV, and
+`d_longdbl` to define if `long double` is defined.
+`long double` is however not used as NV, and worst `%g` is used as
+printf format for NV, not `%.16g` as it should be done to keep double
+precision. `%g` is just a pretty result to the casual reader, but not
+suitable to keep precision, e.g. for Data::Dumper, YAML, JSON,
+or the B::C or perlito compilers.
+So I changed the NV format to %.16g with commit [3fc61aa](
+and the precision went up, passing the nbody shootout test with argument 1000.
+New result with arg 1000
+ -0.169075164
+ -0.169087605
+Exactly the same.

0 comments on commit 18c5758

Please sign in to comment.