Skip to content

Instantly share code, notes, and snippets.

@ZYROz
Created July 14, 2014 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZYROz/d443e5490e4ae3026a1c to your computer and use it in GitHub Desktop.
Save ZYROz/d443e5490e4ae3026a1c to your computer and use it in GitHub Desktop.
Proposal
Organization: The Perl Foundation
Short description: Over the past few years Parrot has become slower. One of the identified reasons are several de-optimizations which simplified and harmonized the method calling code, esp. the signature handling. My aim is to improve the implementation of the PCC, the parrot calling convention and optimize the run-time, while keeping the external API compliant to the users of the VM.
Additional info: http://wiki.enlightenedperl.org/gsoc2014/ideas/Improve_performance_of_me...
About Me
* What is your e-mail address and IRC nick?
* What is your academic background?
* What other relevant projects have you worked on previously and what knowledge you gained from working on them?
* Why are you the right person to work on this project?
* What other time commitments, such as school work, another job, planned vacation, etc., will you have between May 19 and August 18?
I am currently part of a dual degree program (5yr) at Birla Institute of Technology & Science, Pilani - Goa Campus, India. I am in my 4th year as a candidate for a master’s degree in Mathematics and a bachelor’s degree in Computer Science.
My programming expertise includes proficiency in C and Python and some experience with C++ and Java. I am also well versed with the concepts in Data Structures and Algorithms. My recent programming experience includes my internship at DreamWorks, Bangalore, where I worked with NUKE’s API in C++. My course in Operating Systems involved some basic multi-programming and multi-threading. I have also worked on multiple projects that made an extensive use of OpenGL, as part of my course in Computer Graphics. Currently, I am pursuing courses in Programming languages and Compiler Construction, Computer Organization, Computer Networks and a project in Machine Learning.
I can be reached via mail at a.chirag14@gmail.com and I just use my first name (Chirag) as a nick on #parrot.
(A link to my resume: https://drive.google.com/file/d/0BybK0LDimNWwUHpZMm1lcnZTd2c/edit?usp=sharing)
I am very keen to work on an open source project and find my feet as a contributor. Since I would have completed all my courses in Computer Science by May 2014, I feel that I would be in a good position to apply myself completely through the summer. I have applied for a thesis next semester which would start in August (subject to confirmation in June), which allows me to dedicate my entire summer to my project.
Project Content
* Who is a possible mentor for the project you are proposing?
* What is the ultimate goal of your proposal?
* What components/modules will the proposed work modify or create?
* How do you plan to achieve completion of your project?
* Please provide a schedule with dates and important milestones/deliverables (preferably in two week increments).
* What will be showable two months into the project [1]?
* What benefits does your proposed work have for Perl and its community?
My proposed mentor for the project is Reini Urban (rurban). The major problem that we think needs to be solved is the way ffi-like signatures are parsed in Parrot. These signatures are parsed from a string at run-time and a CallContext PMC is built. We believe that these signatures and associated translations can be more efficiently preprocessed. Since methods calls are precompiled into C code, those translations can be done efficiently at pre-compile time by pmc2c.
For the run-time case, those signatures can be more efficiently stored in the CallContext PMC. These signatures can also be cached in a global signature hash, since they only describe one translation.
Another overhead that was identified is the reallocation of the signature array for every call at run-time; it is using a ResizablePMCArray. For cases with no optional or slurpy args this should be optimizable to a FixedPMCArray with known size at compile-time beforehand.
My mid-term goal will be to get comfortable with parrot and at least be en route to merging some of the compile-time optimizations. My end-term goal will be to at least overcome the above mentioned overheads which we believe will give a measurable performance improvement.
My project will reflect a success if at any point of time, an optimization is made and the corresponding branch is ready to be merged. On the other hand, a failure would be if I fail to add any optimization to improve the runtime speed.
Schedule
My proposed schedule (tentative) for the project is as follows:
Present - 18 May 2014
- Read the Parrot Documentation thoroughly
- Dig up archives and wiki documents and compare the code changes to see what problems are being faced and at what points critical changes were made to Parrot (mostly during the PCC Hackathon)
19 May 2014 - 01 June 2014
- Profiling (probably using CacheGrind) for the current system for benchmarking.
- Identify optimizations that can be merged back from the PCC Hackathon.
- Start coding to implement at least one of the optimizations (if different and easier to implement compared to the above mentioned overheads, else directly work on the non-cached sig objects overhead).
02 June 2014 - 15 June 2014
- Implement the optimizations (the easier one, if any)
- Profiling for the implemented optimizations
- Work on the non-cached sig objects overhead and code for the same
16 June 2014 - 22 June 2014
- Slack Week
- Complete Backlogs (if any)
- Midterm Evaluation
23 June 2014 - 29 June 2014
- Profiling after caching sig objects
- Any other easier optimizations (if any)
30 June 2014 - 13 July 2014
- Work on the ResizableIntegerArray overhead (the reallocation problem) and code for the same
- Profiling after optimization
14 July 2014 - 20 July 2014
- Slack Week
- Complete Backlogs (if any)
21 July 2014 - 11 August 2014
- If other objectives are met then work on possible lexpad optimizations. They can be made optional and are not needed as such by rakudo.
12 August 2014 - 18 August 2014
- Documentation
- Testing / Profiling
19 August 2014 onwards - I hope to continue contributing! :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment