3.2:
+ NBrk;Non_Break
+ WSpace;White_Space
+ scc;Special_Case_Condition
+ sfc;Simple_Case_Folding
4.0:
perl: 5.022000 (darwin 14.5.0) | |
ar.txt: code points: 14308 (U+0000..U+007F: 2698 U+0080..U+07FF: 11610) | |
Rate core this | |
core 26873/s -- -33% | |
this 39928/s 49% -- | |
el.txt: code points: 58748 (U+0000..U+007F: 13560 U+0080..U+07FF: 45150 U+0800..U+FFFF: 38) | |
Rate core this |
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvkbSjboxgPOsq6rbKxww8taPipuM17Fj9xURQjIkEiunb+6mBumR+ct1d//O5Va6/t/srAg14KeQWEY6Ody+EC8DVI02TtX4buBc1rAL7BCRarLrTJCNYpJ9VLhu+h/u2x/3SgdMfHsBKbs65jqDIsSooXjyuJz3GDWrMDculQqwCiGGhkNPkzjdB1cXIOt8PEMRYV8/A/yqZtfIgd9lumT069m3xc1uKSScSpTSI4BeLMRTfydh5JlLATrBEPqHT/Iudb8xy37YdO0v0Et03eL5j8BID7RAZlnNq6ECV22doqBZ2UrfYnaqY/HeiekqaY52vNnATZ0pXlRItKvkuw== [email protected] |
$ perl benchmarks/slurp.pl | |
perl: 5.023001 (darwin 14.4.0) | |
Encode: 2.75 | |
Unicode::UTF8: 0.60 | |
PerlIO::encoding: 0.21 | |
PerlIO::utf8_strict: 0.006 | |
ar.txt: Size: 25918 Code points: 14308 (U+0000..U+007F: 2698 U+0080..U+07FF: 11610) | |
Rate :encoding(UTF-8) Encode :utf8_strict Unicode::UTF8 |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Carp qw[]; | |
use Time::Moment 0.19 qw[]; | |
sub YEAR () { 365.2425 } | |
sub MONTH () { YEAR / 12 } | |
sub DAY () { 1 } |
$ perl benchmarks/bench.pl | |
perl: 5.020001 (darwin 13.3.0) | |
Encode: 2.60 | |
Unicode::UTF8: 0.60 | |
ar.txt: code points: 14308 (U+0000..U+007F: 2698 U+0080..U+07FF: 11610) | |
Rate Encode Unicode::UTF8 | |
Encode 4121/s -- -83% | |
Unicode::UTF8 24613/s 497% -- |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
# <https://bugzilla.mozilla.org/show_bug.cgi?id=136676> | |
# <https://bugs.webkit.org/show_bug.cgi?id=62107> | |
# <https://www.w3.org/Bugs/Public/show_bug.cgi?id=16909> | |
# extracts name and filename values from Content-Disposition header. | |
# returns the escaped value, due to different behaviour across browsers. (see below) |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
# Transparent singleton methods in Perl | |
# First a new anonymous class is created to hold the object's singleton | |
# methods, this anonymous class assumes the role of the object's class | |
# and the original class is designated as the super class of that anonymous | |
# class. This is completely transparent and the anonymous class can't be | |
# referenced by name. |
package unicode; | |
use strict; | |
use warnings; | |
use warnings::register; | |
use Carp qw[croak cluck]; | |
use Encode qw[]; | |
# from perl.h verified in 5.6.2, 5.8.9, 5.10.1 and blead (2010-02-27) | |
sub HINT_BLOCK_SCOPE () { 0x00000100 } |
diff --git a/ext/PerlIO-scalar/scalar.xs b/ext/PerlIO-scalar/scalar.xs | |
index eac682b..d324bdd 100644 | |
--- a/ext/PerlIO-scalar/scalar.xs | |
+++ b/ext/PerlIO-scalar/scalar.xs | |
@@ -125,6 +125,18 @@ PerlIOScalar_tell(pTHX_ PerlIO * f) | |
return s->posn; | |
} | |
+IV | |
+PerlIOScalar_eof(pTHX_ PerlIO * f) |