Experiment with making Python go faster

The goal is to put the compiled pyc files in the APE ZIP.
This commit is contained in:
Justine Tunney 2021-08-18 21:57:11 -07:00
parent 4486ad5c9e
commit ebb8c85496
33 changed files with 9483 additions and 1859 deletions

View file

@ -26,8 +26,13 @@
* @asyncsignalsafe
*/
int __zipos_fstat(const struct ZiposHandle *h, struct stat *st) {
ZTRACE("__zipos_fstat(%`'.*s)",
ZIP_CFILE_NAMESIZE(__zipos_get()->map + h->cfile),
ZIP_CFILE_NAME(__zipos_get()->map + h->cfile));
return __zipos_stat_impl(__zipos_get(), h->cfile, st);
int rc;
if (!(rc = __zipos_stat_impl(__zipos_get(), h->cfile, st))) {
ZTRACE("__zipos_fstat(%`'.*s) → %ld",
ZIP_CFILE_NAMESIZE(__zipos_get()->map + h->cfile),
ZIP_CFILE_NAME(__zipos_get()->map + h->cfile), st->st_size);
return 0;
} else {
return rc;
}
}