Skip to content

有关往控制台渲染(print)字符的一个小小的优化问题 #1

Description

@DexerMatters

其实那些print到控制台的各种函数,每次调用都会在底层开一个新的文件流,然后把东西运输到屏幕上,然后再关闭文件流,这样一开一关会产生时间开销。所以一个优化渲染的方法就是,尽可能降低print类函数的调用次数,不建议像常规渲染那样,一个一个像素渲染的那样一个字符一个字符地打印上去,而是尽可能批量输出(说白了还是减少print类函数的调用次数)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions