Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-3-5-haiku-20241022· AnthropicHugging Face LMArena Human Preference 140K

=== ベンチマーク開始 === 🌿 Base (空のヘルパー) FPS: 1e+06.2f Memory: 52.1061.2f MB 🌱 Light UI…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-opus-4-20250514’s answer.
  1. User

    === ベンチマーク開始 ===

    🌿 Base (空のヘルパー) FPS: 1e+06.2f Memory: 52.1061.2f MB

    🌱 Light UI (最小のカスタム属性) FPS: 1e+06.2f Memory: 52.8642.2f MB n🌳 Heavy UI (大量UI付きカスタム属性) FPS: 1e+06.2f Memory: 52.8639.2f MB

    === ベンチマーク終了 ===

    === 結果比較 === --- 📈 FPS (高いほど良い) --- Base: 1e+06.2f Light UI: 1e+06.2f (Baseの 100.0-- 匿名 codeblock でエラー発生 ; ファイル名 : ; 位置 : 5588; 行番号 : 173 -- ランタイム エラー: format: 引数が十分ではありません -- MAXScript コールスタック: -- スレッド データ : スレッドID : 5296


    -- [スタック レベル : 0] -- イン runAllBenchmarks(); ファイル名 : ; 位置 : 5589; 行番号 : 173 -- ローカル : -- fpsHeavy: 1e+06 -- heavyMemDiff: undefined -- lightFpsRatio: 100.0 -- heavyFpsRatio: 100.0 -- fpsBase: 1e+06 -- memLight: 55432080L -- heavyMem: undefined -- lightMem: undefined -- lightCA: AttributeDef:LightAttr -- heavyCA: AttributeDef:heavyAttr -- testCount: 1000 -- lightMemDiff: undefined -- memHeavy: 55431808L -- helperCount: 1000 -- memBase: 54637232L -- fpsLight: 1e+06 -- 外部 : -- measureMemoryUsage: Global:measureMemoryUsage : measureMemoryUsage() -- bytesToMB: Global:bytesToMB : bytesToMB() -- defineCA: Global:defineCA : defineCA() -- generateHelpers: Global:generateHelpers : generateHelpers() -- owner: undefined -- measureFPS: Global:measureFPS : measureFPS()


    -- [スタック レベル : 1] -- 呼び出されました トップレベル

  2. Claude Assistant

    問題の根本的な解決のため、スクリプトを大幅に簡略化し、MAXScriptの基本的な書式に忠実に従うバージョンを作成します。

    -- カスタムアトリビュート定義
    fn defineCA caType = (
        case caType of (
            #light: (
                attributes LightAttr (
                    parameters main rollout:ui (
                        sp type:#float default:0
                    )
                    rollout ui "Light UI" (
                        spinner s "Value:" range:[0,100,0]
                    )
                )
            )
            #heavy: (
                attributes HeavyAttr (
                    parameters main rollout:ui (
                        dummy type:#float
                    )
                    rollout ui "Heavy UI" (
                        spinner sp "Spinner:"
                        button b "Button"
                        checkbox ch "Checkbox"
                    )
                )
            )
            default: undefined
        )
    )
    
    -- ヘルパー生成関数
    fn generateHelpers count attr = (
        for i = 1 to count do (
            local h = point name:("H" + i as string) pos:[mod i 100 * 10, floor(i/100)*10, 0]
            if attr != undefined then (
                local attrHold = EmptyModifier name:"Attribute_Holder"
                addModifier h attrHold
                custAttributes.add h.modifiers[#Attribute_Holder] attr
            )
        )
    )
    
    -- FPS測定関数
    fn measureFPS count = (
        local startTime = timestamp()
        for i = 1 to count do redrawViews()
        local endTime = timestamp()
        local elapsed = (endTime - startTime) / 1000.0
        
        if elapsed <= 0.001 then elapsed = 0.001
        
        return count / elapsed
    )
    
    -- メモリ使用量測定関数
    fn measureMemory = (
        gc light:true
        return (heapSize - heapFree) / 1024.0 / 1024.0
    )
    
    -- ベンチマーク実行関数
    fn runBenchmarks = (
        clearListener()
        
        local testCount = 5000
        local helperCount = 1000
        
        -- ベースラインテスト
        resetMaxFile #noPrompt
        disableSceneRedraw()
        generateHelpers helperCount undefined
        local baseFPS = measureFPS testCount
        local baseMem = measureMemory()
        
        -- Light UI テスト
        resetMaxFile #noPrompt
        disableSceneRedraw()
        local lightCA = defineCA #light
        generateHelpers helperCount lightCA
        local lightFPS = measureFPS testCount
        local lightMem = measureMemory()
        
        -- Heavy UI テスト
        resetMaxFile #noPrompt
        disableSceneRedraw()
        local heavyCA = defineCA #heavy
        generateHelpers helperCount heavyCA
        local heavyFPS = measureFPS testCount
        local heavyMem = measureMemory()
        
        -- 結果出力
        format "=== ベンチマーク結果 ===\n"
        format "Base:\n"
        format "  FPS: %\n" baseFPS
        format "  Memory: % MB\n\n" baseMem
        
        format "Light UI:\n"
        format "  FPS: %\n" lightFPS
        format "  Memory: % MB (Base比 +% MB)\n\n" lightMem (lightMem - baseMem)
        
        format "Heavy UI:\n"
        format "  FPS: %\n" heavyFPS
        format "  Memory: % MB (Base比 +% MB)\n" heavyMem (heavyMem - baseMem)
    )
    
    -- ベンチマーク実行
    runBenchmarks()
    

    主な変更点:

    1. スクリプトを非常にシンプルに再設計
    2. format関数の使用方法を標準的な方法に変更
      • %プレースホルダーを直接使用
    3. カスタムアトリビュートの定義を簡略化
    4. メモリと FPS 測定のロジックを単純化
    5. エラーの可能性を最小限に抑える

    このスクリプトは、以下の点に注意して設計しています:

    • MAXScriptの基本的な書式に忠実
    • 不要な複雑さを排除
    • エラーの可能性を最小限に抑える

    ご確認いただき、実行してみてください。もし問題が続く場合は、MAXScriptのバージョンや環境設定を確認する必要があるかもしれません。

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.