首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 531 毫秒
1.
李军胜 《程序员》2004,(11):105-105
在数据库编程中,需要经常从数据库中查询数据,当查询条件为确定时,我们可以用明确的SQL语句来实现,但是当查询条件为多个条件的动态组合时,查询语句会由于分支太多及IF语句的多重嵌套而变的相当复杂,在此,笔者提出了一种优化方法,运用本方法可以有效的减少查询语句的分支和数量以及IF条件语句的嵌套重数,从而提高程序的运行效率。  相似文献   

2.
在网格环境下,多服务组合的要求日益强烈.目前的软件管理和开发工具主要针对封闭环境,存在着局限性.在多服务组合管理方面,由于嵌套调用是动态生成,服务发布方无法根据局部信息判断是否存在调用冲突,因此嵌套调用冲突必须动态地、基于已有的全局调用信息加以发现.文中分析了网格环境中存在的嵌套调用冲突的实例,在此基础上提出了嵌套调用冲突发现算法.给出了服务描述规则,并扩展了Globus平台上的服务描述.在增加可用度概念后,对所提出算法进行了优化.  相似文献   

3.
仇宾  崔素丽  孙曼曼  田亮 《计算机仿真》2022,39(4):223-226,432
现有编程模型在面向多核并行计算时,通常表现出线程安全和数据同步控制困难,以及通用性差等问题.在函数可以摆脱状态信息的特点基础上,提出基于Linux平台的多核并行可伸缩函数式编程模型.利用函数的复合和嵌套来描述应用程序任务,完成编程过程中的数据传递和问题拆分,考虑到语法解析与编译过程对模型构建的约束,采用运行时构建动态树...  相似文献   

4.
嵌套移动网络中的路由优化研究   总被引:1,自引:0,他引:1       下载免费PDF全文
针对嵌套移动网络内部节点间通信的乒乓路由问题,提出一种基于绑定更新的路由优化方案。该方案利用绑定更新报文所携带的信息构筑嵌套域内移动路由器的路由信息,实现了嵌套移动网络内部移动路由的功能,有效解决乒乓路由问题,避免由于隧道嵌套而造成的带宽浪费。实验结果表明该方案是可行的。  相似文献   

5.
嵌套分区算法是近年来提出的一种求解大规模优化问题的新型全局优化方法。介绍了嵌套分区算法(NPM)的基本思想,将其应用于求解旅行商问题。分析确定了嵌套分区算法各个算子的策略,提出了一种改进的嵌套分区算法。该算法采用加权抽样法求得初始最可能域,用全局数组记录下每个区域的历史最优解,用3-opt局部搜索算法改进每个区域解的质量。对TSPLIB中部分实例仿真结果表明,所提出的结合3-opt算法的改进嵌套分区算法在求解 TSP问题时可以获得高质量的解。  相似文献   

6.
在多核处理器平台上,针对互关联后继树索引模型,采用OpenMP指导语句对其创建算法进行改进优化.通过与未优化的串行程序结果进行比较,表明在多核处理平台上,对程序进行并行化优化可以提高程序的性能.  相似文献   

7.
形式规约语言中函数运算的优化   总被引:1,自引:0,他引:1  
张荣华  董韫美 《软件学报》2000,11(8):1003-1008
在运行时刻,由于某些函数参数的取值 会造成一些函数被重复调用,这在编译时刻是无法被传统的优化器发现的.针对这种情况,提 出一种运行时刻的优化方法.它通过调用依赖图来消除被重复调用的函数.  相似文献   

8.
一些面向上下文的编程语言已经实现,但在这些语言中所有的层被编译为程序可执行代码的一部分,这限制了程序的应用范围.为了解决该问题,提出一种以虚拟机为核心的方法支持动态层绑定,它融入对象组合与代理到虚拟机实现层激活,利用虚拟机服务支持动态层绑定.为了精确描述该方法并有效分析该方法对程序类型安全的影响,定义一个以Featherweight Java演算为核心的演算.基于该演算,形式化分析它对程序类型安全的影响,定义相应的约束,并证明在满足该约束下动态层绑定能保持程序的类型安全.为证明方法可行,以演算为指导,通过扩展Java的编译器与虚拟机实现并评估该方法.该演算和方法的实现可用于指导类似Java的语言的扩展,以支持程序动态地绑定层,同时保证扩展后语言的类型安全.  相似文献   

9.
吴海山  季燏汪芸 《微机发展》2005,15(4):40-42,45
在网格环境下,多服务组合的要求日益强烈。目前的软件管理和开发工具主要针对封闭环境,存在着局限性。在多服务组合管理方面,由于嵌套调用是动态生成,服务发布方无法根据局部信息判断是否存在调用冲突,因此嵌套调用冲突必须动态地、基于已有的全局调用信息加以发现。文中分析了网格环境中存在的嵌套调用冲突的实例,在此基础上提出了嵌套调用冲突发现算法。给出了服务描述规则,并扩展了Globus平台上的服务描述。在增加可用度概念后,对所提出算法进行了优化。  相似文献   

10.
王雷  周晶  金茂忠 《软件学报》2007,18(10):2393-2402
动态编译技术是非常有效的一项优化技术,但是,当前的信息采集与持续监控技术面临运行开销过大、信息精度不够以及代码过渡膨胀等问题.以Intel ORP(open runtime platform)作为基础平台,设计了基于在线反馈与持续监控的动态编译系统;根据当前信息采集技术存在的一些问题改进了代码插装机制;实现了对虚方法接收者对象的类型持续监控;编译系统根据在线采集和持续监控所获得的信息指导内联优化;针对持续监控过程中产生大量无用代码的问题,提出了已编译代码动态卸载方法.SpecJVM98和Java Grande Forum Benchmark等测试基准的运行结果表明,被测程序的平均性能得到了提高.同时,代码动态卸载算法也有效地减轻了系统的运行时负载.  相似文献   

11.
数据流分析算法可以分类成流敏感和流非敏感两类。为了提高效率,流非敏感的跨过程分析没有利用与每个过程相关的过程内的控制流信息。文中,提出了一种流非敏感的数据流分析算法来计算指针引起的跨过程的别名问题。通过如下方法来提高了分析的精度:利用某些特定类型的注销(kill)信息,这些信息可以提前计算;计算每个过程内产生的别名信息,而不是只计算每个过程的出口点产生的别名信息。  相似文献   

12.
In compiling applications for distributed memory machines, runtime analysis is required when data to be communicated cannot be determined at compile-time. One such class of applications requiring runtime analysis is block structured codes. These codes employ multiple structured meshes, which may be nested (for multigrid codes) and/or irregularly coupled (called multiblock or irregularly coupled regular mesh problems). In this paper, we present runtime and compile-time analysis for compiling such applications on distributed memory parallel machines in an efficient and machine-independent fashion. We have designed and implemented a runtime library which supports the runtime analysis required. The library is currently implemented on several different systems. We have also developed compiler analysis for determining data access patterns at compile time and inserting calls to the appropriate runtime routines. Our methods can be used by compilers for HPF-like parallel programming languages in compiling codes in which data distribution, loop bounds and/or strides are unknown at compile-time. To demonstrate the efficacy of our approach, we have implemented our compiler analysis in the Fortran 90D/HPF compiler developed at Syracuse University. We have experimented with a multi-bloc Navier-Stokes solver template and a multigrid code. Our experimental results show that our primitives have low runtime communication overheads and the compiler parallelized codes perform within 20% of the codes parallelized by manually inserting calls to the runtime library  相似文献   

13.
Richardson  S. Ganapathi  M. 《Computer》1989,22(2):42-50
Procedure calls can be a major obstacle to the analysis of computer programs, preventing significant improvements in program speed. A broad range of techniques, each of which is in some sense interprocedural by nature, is considered to overcome this obstacle. Some techniques rely on interprocedural dataflow in their analysis. Others require interprocedural information in the form of detailed profile data or information concerning the scope of a given procedure in relation to other procedures. These include procedure integration, interprocedural register allocation, pointer and alias tracking, and dependency analysis  相似文献   

14.
GAGAN AGRAWAL  JOEL SALTZ 《Software》1997,27(5):519-545
Data parallel languages like High Performance Fortran (HPF) are emerging as the architecture independent mode of programming distributed memory parallel machines. In this paper, we present the interprocedural optimizations required for compiling applications having irregular data access patterns, when coded in such data parallel languages. We have developed an Interprocedural Partial Redundancy Elimination (IPRE) algorithm for optimized placement of runtime preprocessing routine and collective communication routines inserted for managing communication in such codes. We also present two new interprocedural optimizations: placement of scatter routines and use of coalescing and incremental routines. We then describe how program slicing can be used for further applying IPRE in more complex scenarios. We have done a preliminary implementation of the schemes presented here using the Fortran D compilation system as the necessary infrastructure. We present experimental results from two codes compiled usng our system to demonstrate the efficacy of the presented schemes. ©1997 John Wiley & Sons, Ltd.  相似文献   

15.
The extension of dataflow testing to interprocedural testing is described. This was done by developing both an analysis technique that computes the required interprocedural definition-use information, for both direct and indirect dependencies and a testing technique that uses this information in selecting and executing the subpaths across procedure boundaries. A testing tool that implements this technique is presented. For the interprocedural dataflow analysis, the technique summarizes the individual procedures' definition and use information at call sites and then propagates this information throughout the interacting procedures. By efficiently computing the interprocedural data dependencies before testing, the approach lets the testing tool use existing path-selection techniques based on dataflow for interprocedural testing. To track the execution path, the technique recognizes the calls to and returns from procedures and handles the association of various names with a definition as the execution path is being inspected. The technique handles recursive procedures and supports separate compilation of procedures  相似文献   

16.
This paper addresses the analysis of subroutine side effects in the ParaScope programming environment, an ambitious collection of tools for developing, understanding, and compiling parallel programs. In spite of significant progress in the optimization of programs for execution on parallel and vector computers, compilers must still be very conservative when optimizing the code surrounding a call site, due to the lack of information about the code in the subroutine being invoked. This has resulted in the development of algorithms for interprocedural analysis of the side effects of a subroutine, which summarize the body of a subroutine, producing approximate information to improve optimization. This paper reviews the effectiveness of these methods in preparing programs for execution on parallel computers. It is shown that existing techniques are insufficient and a new technique, called regular section analysis, is described. Regular section analysis extends the lattice used in previous interprocedural analysis methods to one that is rich enough to represent common array access patterns: elements, rows, columns, and their higher-dimensional analogs. Regular sections are defined, their properties are established, and the modifications to existing interprocedural analysis algorithms required to handle regular sections are presented. Among these modifications are methods for dealing with language features that reshape array parameters at call sites. In addition to improved precision of summary information, we also examine two problems crucial to effective parallelization. The first addresses the need for information about which variables are always redefined as a side effect of a call and the second addresses the requirement that, for parallel programming, information about side effects must be qualified by information about any critical regions in which those side effects take place. These problems are solved by extensions to existing interprocedural dataflow analysis frameworks.  相似文献   

17.
本文设计并实现了一个基于值一剖面的OpenMP运行时优化系统CCRG OpenMP。它能够根据常见的值的组合优化并行区域,并且在运行时只有并行区代码需要重编译和管理。CCRG OpenMP基于动态重编译技术,避免了目前静态多版本技术的不足。同时,值-剖面的收集和分析由独立的动态优化器线程完成,降低了动态重编译引入的开销。SPEC OMP2001基准测试表明,我们基于值一剖面的Open MP优化系统能够较大地提高程序性能。  相似文献   

18.
Inline expansion and interprocedural register allocation are two general approaches used for interprocedural optimization. However, there are certain situations which prevent either of them from being applied smoothly to procedure calls. Especially, interactions between inlining and register allocation can cause an inlined version of a program to run more slowly than its noninlined counterpart. This paper describes a method of integrating inlining and interprocedural register allocation to reduce the procedure call overhead without this negative effect. We use profile information to identify the heavy called procedures regions and the register usage information of each code site to optimize the placement of the register save/restore code. This method also takes full advantage offree-use registers at each procedure call site. The average performance improvement is 1.21 compared with the previous schemes that performed either of them independently.  相似文献   

19.
The execution time of object oriented programs can be drastically reduced by transforming “non escaping” objects into a collection of its component scalar data fields. But for languages that support dynamic linking, this kind of optimization (which we call “object resolution”) can usually only be performed at runtime, when the entire program is available for analysis. In such cases, the resulting performance increases will be offset by the additional costs that arise during the analysis and restructuring phases.In this paper, we describe work in progress, which provides an annotation technique that reduces the runtime overhead required for performing object resolutions. Our method performs a partial static escape analysis of each class at compile-time and then annotates the intermediate representation of that class with information which the just-in-time (JIT) compiler can use for object resolution. We apply this technique to the safe TSA intermediate representation, producing a simple extension to safe TSA's type system that guarantees a safe and verifiable transmission of the annotated program.  相似文献   

20.
In ALGOL-like programming languages with procedures there are several properties of programs concerning procedures that may be used to improve resp. optimise the performance of the runtime system. In these considerations problems very soon arise, because in general one has to discuss programs with an arbitrary nesting of procedure declarations. This paper shows that an arbitrary ALGOL 60-program can be transformed into an ALGOL 60-program which has a maximal procedure nesting 2, and both programs define the same input-output function. In order to prove this property a new notion for equivalence of ALGOL-like programs with procedures is introduced.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号