> I would be curious of another test: use pymalloc for objects larger > than 512 bytes. For example, allocate up to 4 KB?
Since current pool size is 4KB and there is pool_header in pool, we can't allocate 4KB block from pool. And if support 1KB block, only 3KB of 4KB can be actually used. I think 512 bytes / 4KB (1/8) is good ratio. Do you mean increase pool size? How about adding configure option like server-mode? SMALL_REQUEST_THRESHOLD 1024 // 2x POOL_SIZE (16*1024) // 4x ARENA_SIZE (2*1024*1024) // 8x, and same to huge page size. > > In the past, we already changed the maximum size from 256 to 512 to > support most common Python objects on 64-bit platforms. Since Python > objects contain many pointers: switching from 32 bit to 64 bit can > double the size of the object in the worst case. > Make sense. Naoki _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com