modexp: use intx::shl() and intx::shr()

オープン
#1,820 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
56/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp
領域
backend

調査の方向性

Start in modexp.cpp at the word-span shr() around line 120 and inspect how it moves words and shifts bits. Check the intx word-span shl() and shr() APIs and their shift limits, then review rem() alongside the division kernels after the specified intx update. Done means the redundant bit-shift loops and normalization shifts are removed while modexp behavior remains correct.

索引モデルが issue の本文から書いたものです。

説明

modexp.cpp has its own shr() for word spans (line 120): it moves the words and then shifts the bits with its own loop. intx has public intx::shl() and intx::shr() for word spans (shifts below 64 bits), which can do the bit part. On the next intx update rem() also has to follow the division kernels, which normalize the words themselves since chfast/intx#412, #413 and #420, so the normalization shifts there go away.

主要言語
C++
スター
979
フォーク
340
平均マージ
12時間 16分
マージ済み PR(30日)
25

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ipsilon/evmone のほかの issue

ipsilon/evmone の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。