Distribuindo o projeto acelerado
Empacote, verifique e relate o ganho de velocidade.
Distribuindo o projeto acelerado é uma aula grátis de Mojo Academy no CoddyKit. Esta é a aula 4 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Mojo Academy, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Mojo Academy inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em inglês.
Time to Ship
The kernel is fast and correct. Now package it, prove the win, and hand off a project others can actually use. 🚀
Organize Into Modules
Split the code into clear files. One module for the kernel, one for I/O, keeps the project readable as it grows.
from kernel import sum_squares
from io_utils import load_dataDefine a Public API
Decide what users call and what stays internal. A small, clear API means people use your code without reading every line.
Build a Package
Bundle the modules into a single shareable file. A .mojopkg lets others import your accelerated code with one line.
mojo package myproj -o myproj.mojopkgKeep Python Where It Fits
The app can stay mostly Python and call your Mojo kernel through interop. You accelerate the hot path without rewriting everything.
Run the Final Benchmark
Time the shipped pipeline end to end. This final benchmark is what you compare to the original Python baseline.
Compute the Speedup
Divide the old time by the new time to get the speedup. A clean ratio tells the whole story in a single honest number.
speedup = baseline_time / mojo_timeVerify Once More
Run the full app on real input and check the output against the reference. Final correctness matters as much as the speed gain.
Report Honestly
State the input size, hardware, and method with the result. An honest report lets others trust and reproduce your numbers.
Document the Project
Write a short note on how to install, run, and benchmark it. Good docs turn a fast experiment into something people can adopt.
Reflect on the Journey
You profiled, ported the hot path, vectorized, parallelized, tuned, and shipped. That full workflow is how real Mojo acceleration happens.
Quick Check
Pick the right way to report your capstone result.
Recap
You packaged the kernel, ran a final benchmark, verified correctness, and reported an honest speedup. Your accelerated project is ready to ship. 🎯
Perguntas Frequentes
A aula “Distribuindo o projeto acelerado” é grátis?
Sim — o texto completo de “Distribuindo o projeto acelerado” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Mojo Academy, atualize para CoddyKit PRO. O curso de Mojo Academy inclui 4 aulas no total.
O que vou aprender em “Distribuindo o projeto acelerado”?
Empacote, verifique e relate o ganho de velocidade. Você pratica Mojo Academy com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar Mojo Academy?
Nenhuma experiência prévia é necessária. Mojo Academy no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 4 de 4.
Quanto tempo leva a aula “Distribuindo o projeto acelerado”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de Mojo Academy?
Sim. Cada aula de Mojo Academy inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- Analisando o desempenho do Python de referência
- Reescrevendo o caminho crítico em Mojo
- Paralelizando e ajustando o núcleo
- Distribuindo o projeto acelerado