Code & Life
84 subscribers
24 photos
2 videos
1 file
31 links
اینجا درباره کدنویسی ، چیزهایی که یاد میگیرم و مطالعه میکنم و روزمره‌هام می‌نویسم.

https://erfuuan.github.io/
Download Telegram
Code & Life
نکات مهم :
JIT essentially plays the role of both an interpreter and a compiler simultaneously.
1
Just-In-Time Compiler (JIT):

JIT comprises three primary phases: Profiler, Baseline Compiler, and Optimizing Compiler.
1
Profiler: Also referred to as a monitor, the profiler tracks the portions of code running most frequently while the JavaScript (JS) code passes through the JS engine. It identifies frequently used code, designating it as “WARM.” If the same code is used even more frequently, it becomes “HOT CODE.” The profiler extracts the most commonly executed code from our source code.
1
Baseline Compiler: The WARM or HOT code is then translated into bytecode within the Baseline Compiler.
1
Optimizing Compiler: The HOT parts identified by the profiler are passed to the optimizing compiler. Its main task is to transform these hot parts into an optimized version that runs even faster. The JavaScript engine utilizes the concept of “shape” to achieve this optimization. Objects created using the same constructor function have the same shape because their properties are identical. Shape creation facilitates inline caching and other optimizations. In the baseline compiler, we discussed bytecode. However, bytecode is not as fast as machine code. By directly converting frequently executed code into machine code, the program’s performance improves significantly. The optimizing compiler handles this task.

The process involves transforming JavaScript source code into bytecode, executed by an interpreter. Meanwhile, the monitor or profiler forwards warm and hot code parts to the optimizing compiler, which then converts them into optimized machine code. Both the interpreter and the compiler contribute to enhancing program performance. This exemplifies the concept of just-in-time compilation. However, it’s important to note that different browsers have their own JIT implementations, while the main task remains consistent.
1
1
When a JavaScript program reaches the parser, it generates nodes from the provided tokens after the tokenization process. These nodes are used to create the Abstract Syntax Tree (AST), which is later converted into bytecode by the interpreter. The interpreter in the V8 engine is known as Ignition. Within the interpreter, bytecode is executed using registers as memory. The V8 engine optimizes performance by creating shapes for each object and describing their structure. This optimization enables inline caching and other optimizations.
2
The interpreter, called Ignition in the V8 engine
Code & Life
The interpreter, called Ignition in the V8 engine
خوشم اومد از توضیحش 😂😂
Code & Life
Photo
Although the description above doesn’t actively mention the profiler, it works behind the scenes, identifying the “hot” code parts that are then passed to the Turbofan compiler. Turbofan is the JIT compiler within the V8 engine responsible for optimizing these “hot code” sections. It transforms them into machine code tailored to the specific architecture, ensuring optimal performance.

In summary, the profiler receives bytecode from the interpreter and passes the identified “hot” sections to the Turbofan compiler for transformation into machine code. This machine code is designed to deliver efficient performance on the target architecture.

@erfuuan_dev
1
Code & Life
https://dev.to/jps27cse/exploring-asynchronous-javascript-callbacks-promises-and-asyncawait-16k6
یه توضیح کوتاه درباره JavaScript: Callbacks, Promises, and Async/Await
1
Forwarded from Node Master (NoName)
خیلی از دوستانی که من میشناسم اکثرا به صورت self thought بودن و از رشته های دیگ وارد برنامه نویسی شدن.
بخاطر همین موضوع ممکنه یکم سردرگمی برای دوستان پیش بیاد درمورد مفاهیم پایه ای تر مربوط به Computer science و البته شما چه frontend یا backend باشید هرچقد در این مفاهیم عمیق تر باشید در بازار کار به شما Competitive advantage میده و کار پیدا کردن برای شما خیلی راحت تر میشه و این موضوع رو هم قشنگ حس میکنید.

نکته بعدی این که این مسیر به هیچ عنوان یک مسیر یک شب یک ماه و یک ساله نیست و سال ها زمان بر هست و این شما هستین که تصمیم میگرید چقدر برای شما کافی هست با توجه به علاقه شما. میتونید این ها رو ندونید و درآمد قابل قبولی هم داشته باشید ولی اگر قصد پیشرفت دارید این مفاهیم از واجبات هست.

خودم هم در همین مسیر هستم و دارم یاد میگیرم و از این منابع استفاده میکنم و امیدوارم براتون مفید باشه و کورس ها و نکاتی هم که اینجا میگم باتوجه به سطحی که حس میکنید دارید انتخاب کنید و ببینید.

- همیشه هروقت کسی از من درمورد مسیر Backend سوال میپرسه من تاکید خیلی زیادی روی database و database design دارم.
https://downloadly.ir/elearning/video-tutorials/complete-intro-to-databases/
https://downloadly.ir/elearning/video-tutorials/complete-intro-to-sql-postgresql/
و اگر سطح خوبی دارید و میخواید deep تر بشید قطعا این چنل یوتیوب یک طلا درمورد database ها هست بیشتر از زاویه آکادمیک به مسائل نگاه میکنه و خب برای باتجربه تر ها خیلی مناسب هست.
https://www.youtube.com/@CMUDatabaseGroup

- موضوع بعدی networking هست. شما چه frontend باشی یا backend باید و باید OSI Model رو به صورت قلبی درک کرده باشی و البته در حد پایه ای network رو بشناسین شاید شما بگی من فرانت هستم لازم نداره. ممکنه این موضوع مستقیم تاثیری روی کار شما نداشته باشه ولی وقتی همکار devops شما اگر ازتون سوالی پرسید میتونید باهاش همکاری کنید مثل مجسمه خشک به همکارتون نگاه نمیکنید و این خیلی نکته مثبتی هست.
https://downloadly.ir/elearning/video-tutorials/introduction-to-computer-networking-2-hour-crash-course/
این دوره خیلی کوتاه هست و برای خیلی ها کافی هست و بیشتر نیازی نیست پیش برید ولی برای همه لازم هست. بقیه بیشتر برای عمیق تر شدن و علاقه هست.
https://downloadly.ir/elearning/video-tutorials/comptia-network-n10-008-full-course-practice-exam-1/
https://www.goodreads.com/book/show/59147607-computer-networking-global-edition

این کتاب که پایین میزارم یک خورده قدیمی هست و اگر میخواید مطالعه کنید یکم دقت کنید. درکل کتاب باارزشی هست.
https://www.goodreads.com/book/show/505564.The_TCP_IP_Guide

در ادامه از این دو repo سعید کنید الهام بگیرد برای مطالعه و deep تر شدن.
https://github.com/ossu/computer-science
https://github.com/jwasham/coding-interview-university

مفاهیم دیگه ای که در آینده با هم منابع مهمشون رو برسی میکنیم مثل سیستم عامل و مفاهیم low level تر مثل Computer architecture.

یک نکته دیگ این که اگر حس میکنید من میتونم به شما کمکی کنم در هرموردی میتونید PV به من پیام بدین و من خیلی خوشحال میشم اگر بتونم کمکی کنم.

#Course #Book #Guide
But it will be foolish to assume that since we have a garbage collector to clear the memory for us, we shouldn't worry about memory management because there is no perfect system.
@erfuuan_dev
1