<commit_before>#include <ecpy.h>
using namespace std;

int main(int ac, char **av) {
  try {
    /*
    auto F = FiniteField(7);
    auto x = F(4);
    auto y = F(5);
    cout << x << endl;
    cout << y << endl;
    cout << x + y << endl;
    cout << x * y << endl;
    */
    auto F = FiniteField(631);
    auto E = EllipticCurve<FiniteField>(F, 30, 34);
    auto P = E(36, 60);
    auto Q = E(121, 387);
    auto S = E(0, 36);
    cout << weil_pairing(E, P, Q, S, 5) << endl;
    cout << tate_pairing(E, P, Q, 5, 1) << endl;
  } catch (const char *message) {
    cerr << message << endl;
  }
  return 0;
}<commit_msg>add time test<commit_after>#include <ecpy.h>
using namespace std;

constexpr int CYCLE = 10000;

#define ES_TIME_TEST(init, x) do {\
  clock_t start, end;\
  cout << "Start (" << #x << ")... " << endl; \
  init; \
  start = clock(); \
  for (int i = 0; i < CYCLE; i++) { x; } \
  end = clock(); \
  cout << "\tFinished." << endl << "Time: " << ((double)end - start)/CLOCKS_PER_SEC/CYCLE * 1e+6 << "usec" << endl; \
} while (0)

int main(int ac, char **av) {
  try {
    /*
    auto F = FiniteField(7);
    auto x = F(4);
    auto y = F(5);
    cout << x << endl;
    cout << y << endl;
    cout << x + y << endl;
    cout << x * y << endl;
    */
    auto F = FiniteField(631);
    auto E = EllipticCurve<FiniteField>(F, 30, 34);
    auto P = E(36, 60);
    auto Q = E(121, 387);
    auto S = E(0, 36);
    cout << weil_pairing(E, P, Q, S, 5) << endl;
    cout << tate_pairing(E, P, Q, 5, 1) << endl;
    ES_TIME_TEST(FiniteField F(631); EllipticCurve<FiniteField> E(F, 30, 34); auto P = E(36, 60); auto Q = E(121, 387); auto S = E(0, 36);, weil_pairing(E, P, Q, S, 5));
  } catch (const char *message) {
    cerr << message << endl;
  }
  return 0;
}
{'fraction_non_alphanumeric': 0.20045172219085264, 'fraction_numerical': 0.04743083003952569, 'mean_word_length': 2.467710371819961, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2707439', 'n_tokens_mistral': 790, 'n_tokens_neox': 727, 'n_words': 218}