没有合适的资源?快使用搜索试试~ 我知道了~
05 You Don't Know JS:Async&Performance.pdf
需积分: 10 12 下载量 150 浏览量
2017-08-16
14:26:04
上传
评论 1
收藏 1.33MB PDF 举报
温馨提示
试读
177页
05 You Don't Know JS:Async&Performance
资源推荐
资源详情
资源评论
1. Introduction
2. Foreword
3. Preface
4. Chapter1:Asynchrony:Now&Later
i. AProgramInChunks
ii. EventLoop
iii. ParallelThreading
iv. Concurrency
v. Jobs
vi. StatementOrdering
5. Chapter2:Callbacks
i. Continuations
ii. SequentialBrain
iii. TrustIssues
iv. TryingToSaveCallbacks
6. Chapter3:Promises
i. WhatisaPromise?
ii. ThenableDuck-Typing
iii. PromiseTrust
iv. ChainFlow
v. ErrorHandling
vi. PromisePatterns
vii. PromiseAPIRecap
viii. PromiseLimitations
7. Chapter4:Generators
i. BreakingRun-to-completion
ii. Generator'ingValues
iii. IteratingGeneratorsAsynchronously
iv. Generators+Promises
v. GeneratorDelegation
vi. GeneratorConcurrency
vii. Thunks
viii. Pre-ES6Generators
8. Chapter5:ProgramPerformance
i. WebWorkers
ii. SIMD
iii. asm.js
9. Chapter6:Benchmarking&Tuning
i. Benchmarking
ii. ContextIsKing
iii. jsPerf.com
iv. WritingGoodTests
v. Microperformance
vi. TailCallOptimization(TCO)
10. AppendixA:*asynquence*Library
11. AppendixB:AdvancedAsyncPatterns
12. AppendixC:ThankYou's!
TableofContents
YouDon'tKnowJS:Async&Performance
2
ThisisaseriesofbooksdivingdeepintothecoremechanismsoftheJavaScriptlanguage.
PleasefeelfreetocontributetothequalityofthiscontentbysubmittingPR'sforimprovementstocodesnippets,
explanations,etc.Whiletypofixesarewelcomed,theywilllikelybecaughtthroughnormaleditingprocesses,andarethus
notnecessarilyasimportantforthisrepository.
Toreadmoreaboutthemotivationsandperspectivebehindthisbookseries,checkoutthePreface.
Readonline(free!):"Up&Going",Published:BuyNow,ebookformatisfree!
Readonline(free!):"Scope&Closures",Published:BuyNow
Readonline(free!):"this&ObjectPrototypes",Published:BuyNow
Readonline(free!):"Types&Grammar",Published:BuyNow
Readonline(free!):"Async&Performance",Published:BuyNow
Readonline(free!):"ES6&Beyond"(inproduction)
Thesebooksarebeingreleasedhereasdrafts,freetoread,butarealsobeingedited,produced,andpublishedthrough
O'Reilly.
Ifyoulikethecontentyoufindhere,andwanttosupportmorecontentlikeit,pleasepurchasethebooksoncetheyare
availableforsale,throughyournormalbooksources.:)
Ifyou'dliketocontributefinanciallytowardstheeffort(oranyofmyotherOSSwork)asidefrompurchasingthebooks,Ido
haveapatreonthatIwouldalwaysappreciateyourgenerositytowards.
ThecontentforthesebooksderivesheavilyfromaseriesoftrainingmaterialsIteachprofessionally(inbothpublicand
private-corporateworkshopformat),called"AdvancedJS:The'WhatYouNeedToKnow'Parts".
Ifyoulikethiscontentandwouldliketocontactmeregardingconductingtrainingonthese,orothervarious
JS/HTML5/node.jstopics,pleasereachouttomethroughanyofthesechannelslistedhere:
http://getify.me
IalsohavesomeJStrainingmaterialavailableinon-demandvideoformat.IteachcoursesthroughFrontendMasters,like
YouDon'tKnowJS(bookseries)
Titles
Publishing
In-personTraining
OnlineVideoTraining
YouDon'tKnowJS:Async&Performance
3Introduction
myAdvancedJSworkshop(morecoursescomingsoon!).
ThatsamecourseisalsoavailablethroughPluralsight.
Anycontributionsyoumaketothiseffortareofcoursegreatlyappreciated.
However,ifyouchoosetocontributecontent(notjusttypocorrections)tothisrepo,youagreethatyou'regivingmeanon-
exclusivelicensetousethatcontentforthebookseries,asI(andO'Reilly)deemappropriate.Youprobablyguessedthat
already,butwejusthavetomakethelawyershappybyexplicitlystatingit.
So:blah,blah,blah...:)
Thematerialshereinareall(c)2013-2015KyleSimpson.
ThisworkislicensedunderaCreativeCommonsAttribution-NonCommercial-NoDerivs3.0UnportedLicense.
ContentContributions
License&Copyright
YouDon'tKnowJS:Async&Performance
4Introduction
Overtheyears,myemployerhastrustedmeenoughtoconductinterviews.Ifwe'relookingforsomeonewithskillsin
JavaScript,myfirstlineofquestioning…actuallythat'snottrue,Ifirstcheckifthecandidateneedsthebathroomand/ora
drink,becausecomfortisimportant,butonceI'mpastthebitaboutthecandidate'sfluidin/out-take,Isetaboutdetermining
ifthecandidateknowsJavaScript,orjustjQuery.
Notthatthere'sanythingwrongwithjQuery.ItletsyoudoalotwithoutreallyknowingJavaScript,andthat'safeaturenota
bug.ButifthejobcallsforadvancedskillsinJavaScriptperformanceandmaintainability,youneedsomeonewhoknows
howlibrariessuchasjQueryareputtogether.YouneedtobeabletoharnessthecoreofJavaScriptthesamewaytheydo.
IfIwanttogetapictureofsomeone'scoreJavaScriptskill,I'mmostinterestedinwhattheymakeofclosures(you'veread
thatbookofthisseriesalready,right?)andhowtogetthemostoutofasynchronicity,whichbringsustothisbook.
Forstarters,you'llbetakenthroughcallbacks,thebreadandbutterofasynchronousprogramming.Ofcourse,breadand
butterdoesnotmakeforaparticularlysatisfyingmeal,butthenextcourseisfulloftastytastypromises!
Ifyoudon'tknowpromises,nowisthetimetolearn.Promisesarenowtheofficialwaytoprovideasyncreturnvaluesin
bothJavaScriptandtheDOM.AllfutureasyncDOMAPIswillusethem,manyalreadydo,sobeprepared!Atthetimeof
writing,Promiseshaveshippedinmostmajorbrowsers,withIEshippingsoon.Onceyou'vefinishedthat,Ihopeyouleft
roomforthenextcourse,Generators.
GeneratorssnucktheirwayintostableversionsofChromeandFirefoxwithouttoomuchpompandceremony,because,
frankly,they'remorecomplicatedthantheyareinteresting.Or,that'swhatIthoughtuntilIsawthemcombinedwith
promises.There,theybecomeanimportanttoolinreadabilityandmaintenance.
Fordessert,well,Iwon'tspoilthesurprise,butpreparetogazeintothefutureofJavaScript!Featuresthatgiveyoumore
andmorecontroloverconcurrencyandasynchronicity.
Well,Iwon'tblockyourenjoymentofthebookanylonger,onwiththeshow!Ifyou'vealreadyreadpartofthebookbefore
readingthisForeword,giveyourself10asynchronouspoints!Youdeservethem!
JakeArchibald
jakearchibald.com,@jaffathecake
DeveloperAdvocateatGoogleChrome
Foreword
YouDon'tKnowJS:Async&Performance
5Foreword
剩余176页未读,继续阅读
资源评论
爱琴忆海
- 粉丝: 251
- 资源: 425
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功