Go - Functions - 4


  • Must declare a func before let func call itself recursively. Otherwise compile error
  • Loop will reuse variable address, so a new variable must be declared to get loop variable value if the value will be used later in closure
    • Must not just pass loop variable to later use, otherwise will just reuse the last value
    • Declare a new variable to get the value if you need use it later

沒有留言:

張貼留言

Lessons Learned While Benchmarking vLLM with GPU

Recently, I benchmarked vLLM on a GPU to better understand how much throughput can realistically be expected in an LLM serving setup. One ...