hacking perl5 core

13
A road to hacking on perl5 [email protected]

Upload: ruslan-zakirov

Post on 12-May-2015

618 views

Category:

Technology


0 download

DESCRIPTION

A short success story

TRANSCRIPT

Page 1: Hacking perl5 core

Aroad to hacking on

[email protected]

Page 2: Hacking perl5 core

From a challenge

[email protected] Kiev, YAPC::EU 2013

Page 3: Hacking perl5 core

Devel::PPAP

[email protected] Kiev, YAPC::EU 2013

Page 4: Hacking perl5 core

●May fail to compile●5.16.x only●Incomplete●Way to start playing

[email protected] Kiev, YAPC::EU 2013

Page 5: Hacking perl5 core

Since● shift; # w/o argument ● delete $hash{'const'};● $tied{foo}

[email protected] Kiev, YAPC::EU 2013

Page 6: Hacking perl5 core

Failed optimisation●10+ commits●Better code●Corner case fixes●Tests●Bit faster afterall [email protected] Kiev, YAPC::EU 2013

Page 7: Hacking perl5 core

my %r = map { $_ => $h{$_} } 'a', 'b', 'c';

[email protected] Kiev, YAPC::EU 2013

Page 8: Hacking perl5 core

my %r = (a => $h{'a'},b => $h{'b'},

...);

[email protected] Kiev, YAPC::EU 2013

Page 9: Hacking perl5 core

my %r = %h{'a', 'b', 'c'};

[email protected] Kiev, YAPC::EU 2013

Page 10: Hacking perl5 core

OMG!I'm changing Perl

syntax...

[email protected] Kiev, YAPC::EU 2013

Page 11: Hacking perl5 core

●11 loc in toke.y●48 loc in pp.c●proof in 4 hours●comes in 5.20

[email protected] Kiev, YAPC::EU 2013

Page 12: Hacking perl5 core

perl5 core is NOT that complex

[email protected] Kiev, YAPC::EU 2013

Page 13: Hacking perl5 core

Let's make perldelta that MAKES

DIFFERENCE

[email protected] Kiev, YAPC::EU 2013