zoukankan      html  css  js  c++  java
  • 果然逆天,处理一亿条int32数据排序,需要耗时32秒

    [root@localhost contest]# ./test
    hehe:10
    ----------------------------------------before quick sort--------------
    ----------------------------------------after quick sort-----------------
    ok
    count:2  Used Time:0.000190
    hehe:100
    ----------------------------------------before quick sort--------------
    ----------------------------------------after quick sort-----------------
    ok
    count:4  Used Time:0.000053
    hehe:1000
    ----------------------------------------before quick sort--------------
    ----------------------------------------after quick sort-----------------
    ok
    count:6  Used Time:0.000569
    hehe:10000
    ----------------------------------------before quick sort--------------
    ----------------------------------------after quick sort-----------------
    ok
    count:8  Used Time:0.003498
    hehe:100000
    ----------------------------------------before quick sort--------------
    ----------------------------------------after quick sort-----------------
    ok
    count:10  Used Time:0.044151
    hehe:1000000
    ----------------------------------------before quick sort--------------
    ----------------------------------------after quick sort-----------------
    ok
    count:12  Used Time:0.236078
    hehe:10000000
    ----------------------------------------before quick sort--------------
    ----------------------------------------after quick sort-----------------
    ok
    count:14  Used Time:2.799460
    hehe:100000000
    ----------------------------------------before quick sort--------------
    ----------------------------------------after quick sort-----------------
    ok
    count:16  Used Time:32.029633
    /***********************************************

    看书看原版,原汁原味。

    不会英文?没关系,硬着头皮看下去慢慢熟练,才会有真正收获。

    没有原书,也要网上找PDF来看。

    网上的原版资料多了去了,下载东西也到原始下载点去看看。

    你会知其所以然,呵呵。

    ***********************************************/

  • 相关阅读:
    JavaScript递归方法 生成 json tree 树形结构数据
    分布式系统唯一ID生成方案汇总
    Twitter-Snowflake,64位自增ID算法详解
    手机端页面自适应解决方案—rem布局
    vue.js之路由
    kafka数据迁移实践
    mysql查询时强制区分大小写
    js加密参数传给后台,后台解密base64
    Target runtime com.genuitec.runtime.generic.jee60 is not defined
    怎么在点击浏览器前进、后退键时刷新页面而不读取缓存
  • 原文地址:https://www.cnblogs.com/dpblue/p/3921846.html
Copyright © 2011-2022 走看看