Anh ơi, trong Java người ta nhắc 2 khái niệm là JIT và AOT, em đọc trên mạng mà k hiểu sự khác biệt 2 cái này là gì, anh phân biệt giúp em
Chúc anh và gia đình giáng sinh vui vẻ
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. AOT (Ahead-of-time compilation): là hành động biên dịch từ một ngôn ngữ bậc cao về ngôn ngữ bậc thấp hơn, ví dụ từ java trở về shared library (.so) của C++
2. JIT (Just-in-time compilation): là hành động biên dịch mã nguồn trong quá trình chạy (runtime), ví dụ biên dịch mã nguồn Java sang Java byte code. Em có thể hiểu đơn giản là, bình thường em phải tạo 1 lớp java kiểu:
Và em phải biên dịch trước rồi sau đó mới chạy được. Thì giờ Java sẽ cho phép em truyền mã nguồn trong quá trình chạy và biên dịch nó kiểu: