【问题标题】:The performance of converting strings using marshal_as function使用 marshal_as 函数转换字符串的性能
【发布时间】:2011-11-22 23:21:51
【问题描述】:

目前我正在尝试使用 marshal_as 函数将 String^ 转换为 std::string(链接:http://msdn.microsoft.com/en-us/library/bb384865.aspx)。有谁知道这种转换的性能?谢谢。

【问题讨论】:

    标签: .net c++ managed-c++


    【解决方案1】:

    我的建议:使用它。如果您的代码运行得足够快,则不必担心。转换字符串不太可能成为瓶颈。如果分析显示它一个瓶颈,很可能你的问题不在于marshal_as(我希望它会非常快),而是你的代码在类型。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-04-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-07
      • 2011-11-18
      • 2012-04-09
      • 1970-01-01
      相关资源
      最近更新 更多