Anyone using short and byte primitive types, in real apps?

后端 未结 15 3062
遥遥无期
遥遥无期 2021-02-20 08:09

I have been programming in Java since 2004, mostly enterprise and web applications. But I have never used short or byte, other than a toy program just to know

15条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-20 08:09

    I found I was using byte variables when doing some low-level image processing. The .Net GDI+ draw routines were really slow so I hand-rolled my own.

    Most times, though, I stick with signed integers unless I am forced to use something larger, given the problem constraints. Any sort of physics modeling I do usually requires floats or doubles, even if I don't need the precision.

提交回复
热议问题