HDTenEightyP/NetNews huggingface dataset:
From: raymond@harp.ecn.purdue.edu (Ray Kamin)
Subject: optimizing case-statement execution
Reply-To: raymond@harp.ecn.purdue.edu (Ray Kamin)
Organization: Purdue University Engineering Computer Network
Date: Sun, 22 Nov 1992 19:18:31 GMT
Keywords: C, code, optimize, question, comment

How do compilers (in my case gcc v2.2.2) handle large switch statements?
I have a 120 way switch in my code.  I looked at the sparc assembly code
produced by gcc and it apparently doesn't use any sort of jump table, but
merely does sequential comparisons and branches.

With this in mind, I rewrote the code with each 'case' statement as a
separate function.  I then created a pseudo jump table with function
pointers to each of these functions.  That is, I call:

(*case_fun[switch_val])();

after setting the pointers as:

  case_fun[0] = &case0;
  case_fun[10] = &case10;
  case_fun[31] = &case31;
   .
   .
   .
  etc.

The code is working correctly, however, it is not any faster at all.  Does
anyone have any insight into this, or how this should be written for
speed?

Thanks,

Ray
[There are three general ways to generate code for a switch: a jump table,
which is appropriate if the cases are numerically close to each other, a
binary-compare and branch tree if the set of cases is large and sparse, and
a sequential compare and branch otherwise.  I'd expect that the overhead of
a procedure call would swamp any gain in indirecting through a table, if the
time spent in this part of your program is in fact large enough to make any
difference.  If you really need speed, GCC lets you create arrays of labels
to use like a Fortran computed GOTO, but that is of course ugly and not very
portable. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
Newsgroups: comp.compilers
From: gjditchf@plg.uwaterloo.ca (Glen Ditchfield)
Subject: Re: Tech. report from Tampere
Reply-To: gjditchf@plg.uwaterloo.ca (Glen Ditchfield)
Organization: University of Waterloo
Date: Wed, 18 Nov 1992 14:58:16 GMT
Keywords: FTP, report, parse

em@ohdake.cs.uta.fi (Erkki M{kinen) writes:
>Format: compressed PostScript
>        (download in binary mode and run through uncompress)
>Filename: A-1992-5.ps.Z
>TITLE    = Incremental parser construction with metaobjects

It is also available for anonymous ftp, for a limited time only, at
watmsg.uwaterloo.ca in pub/misc.

    Glen Ditchfield  gjditchfield@violet.uwaterloo.ca  Office: DC 2517
Dept. of Computer Science, U of Waterloo, Waterloo, Ontario, Canada, N2L 3G1
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
Newsgroups: comp.compilers
From: ccsis@sunlab1.bath.ac.uk (Icarus Sparry)
Subject: Re: Sources from J.P. Bennet's book
Reply-To: ccsis@sunlab1.bath.ac.uk (Icarus Sparry)
Organization: Bath University Computing Services, UK
Date: Sun, 22 Nov 1992 22:10:22 GMT
Keywords: books

>>Is there an ftp-site from where I can download the sources from J.P.
>>Bennet`s excellent book "Introduction to Compiling Techniques - A first
>>Course Using Ansi C, Lex and Yacc"?

Is there a demand for this? If so it could appear on ftp.bath.ac.uk.
Requests either to me or jpb@maths.bath.ac.uk
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
Newsgroups: comp.compilers
From: "V.C. SREEDHAR" <sreedhar@binkley.cs.mcgill.ca>
Subject: Memory statistics for optimizers
Reply-To: "V.C. SREEDHAR" <sreedhar@binkley.cs.mcgill.ca>
Organization: Compilers Central
Date: Tue, 17 Nov 1992 17:09:52 GMT
Keywords: optimize, performance, question

We are implementing a compiler incorporating very aggressive analyses
(interprocedural, alias, etc...) and optimizations.  One of our problem is
the memory requirement to support such aggressive optimizations. 

We would like to know from others who have implemented compilers (not
toys) their experiences regarding this problem. We would like to know
statistics of memory allocated for compiling std. benchmarks (SPEC,
SPLASH, PERFECT, RiCeps, etc ...) If you have such statistics, and if you
can share it, please email me.  We are particularly interested from the
groups working on optimizations and parallelizations to share their
experiences...

Thanks a lot

Sreedhar
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
Newsgroups: comp.compilers
From: drw@euclid.mit.edu (Dale R. Worley)
Subject: Re: Is this a new idea?
Reply-To: drw@euclid.mit.edu (Dale R. Worley)
Organization: MIT Dept. of Tetrapilotomy, Cambridge, MA, USA
Date: Mon, 16 Nov 1992 22:24:28 GMT
Keywords: C, design

clyde@hitech.com.au (Clyde Smith-Stubbs) writes:
   ...you can't parse code that contains references to such things as
   typedefs that occur earlier in the code, if the typedef is missing
   or in the middle of being edited....

macrakis@osf.org (Stavros Macrakis) writes:
   This is a C-specific problem: a bug in the design of C's syntax.  Most
   other languages don't commit such foolishness, except of course those
   with extensible syntax.

Any language has this problem if it has tokens whose syntactic
category can't be determined solely by the form of the token.  In C's
case, "identifier" tokens can be either identifiers or type-names.  In
Algol 68, "boldface words" can be either type names or operators.
Almost any language with an extensible set of operators is going to
run into this problem.

Dale

Dale Worley		Dept. of Math., MIT		drw@math.mit.edu
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
Newsgroups: comp.compilers
From: "James A. Cadwell" <cadwell@seattleu.edu>
Subject: In lex, how do I begin in a state??
Reply-To: "James A. Cadwell" <cadwell@seattleu.edu>
Organization: Seattle University
Date: Sat, 21 Nov 1992 03:29:14 GMT
Keywords: lex, question, comment

In lex, one uses BEGIN STATE-NAME in an action to place lex in a
state.  My question is: how do I begin in a state?? That is, have
a state in effect before any input is read.

Thanks,

Jim Cadwell	cadwell@sumax.seattleu.edu
[In short, you have to execute a BEGIN before the lexer starts scanning.
Code put at the front of the rules section is run whenever you call yylex(),
so you could do something like this:

%%
%{
	static int first_time = 1;

	if(first_time) {
		BEGIN FOOSTATE;
		first_time = 0;
	}
...

The new version of O'Reilly's lex&yacc, much of which I wrote, explains this
in more detail. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Mark-sense program for course evaluations?
Organization: George Washington University
Date: Tue, 24 Nov 1992 02:13:16 GMT

Our course evaluation system currently involves multiple-choice forms
which are filled in by hand, i.e. the student circles a number.
These are then hand-keyed into a terminal.

We'd like to convert to a mark-sense ("ETS test") form, to get the
ratings out faster and more accurately. Given the great scanner
technology available and our relatively low volume, this should be 
fairly easy if we can find the right software package.

Does anyone have direct experience with setting up a PC- or Mac-based
OCR program to do mark-sense reading? Or is there a special-purpose
and cheap program out there to do it? Ideally the thing should just
produce a tab- or comma-delimited ASCII file for import into a
spreadsheet or stat package.

Please reply by e-mail; I'll summarize if I get good replies.

Thanks!

Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman

Professor, Dept. of Electrical Engineering and Computer Science
School of Engineering and Applied Science
The George Washington University
Washington, DC 20052 USA
(202) 994-5253 (voice)
(202) 994-5296 (fax)
mfeldman@seas.gwu.edu (Internet)

"Americans wants the fruits of patience -- and they want them now."
------------------------------------------------------------------------
Organisation: European Space Operation Centre (E.S.O.C)
Date: Friday, 13 Nov 1992 20:13:04 CET
From: <RFLOOD@ESOC.BITNET>
Newsgroups: comp.edu
Subject: Canadian Education Wanted

My stepson, Michael, 14 years old and a Canadian citizen, has just been refused
entry to the Spanish school system as he is over their leaving age (which is
14) and the local professional schools - which follow on from 14 - have no
places available. Since we'll be living in Spain from the end of the year, this
leaves him with no education available. (I can't afford private schools or
tuition, and his mother - who is Candian - doesn't want to send him back home).

I'm in touch with the Canadian Education Department in Vancouver, asking about
the possibility of correspondence courses, but does anyone out there in NETLAND
have any ideas. As, for example: any out-of-work  non-smoking Canadian
teachers like to come and live on the Costa Brava in Spain for a year to
teach him ?  (No wages, but board and lodging free. You should like swimming
and sailing and bring lots of sun tan oil).

Any suggestions as to how we can educate young Michael will be appreciated:
please e-mail to me at the above address as I can't always access this
group. (You can also fax me on Germany (49)-6151-902972.)
Newsgroups: comp.edu
Subject: Research Project --->> HELP! <<---
From: schira@ab.wvnet.edu (John Schira, PA-C)
Date: 15 Nov 92 11:52:09 -0500
Organization: Alderson-Broaddus College

I am a physician assistant doing graduate work in Emergency Medicine. My
research thesis is on computer literacy and use among Emergency Department
physicians and physician assistants.

After a literature search I am unable to find any citations that detail 
actual computer literacy rates among this group, or among docs in general.

Are there any Medical-Netters out there who have any relevant information
or sources I could investigate?

Your input is MUCH appreciated. Thanks.

John Schira
schira@ab.wvnet.edu

Newsgroups: comp.edu
From: lcardina@norfolk.vak12ed.edu (Loretta Cardinale)
Subject: Re: Help - Computer Literacy Curriculum Question
Organization: Virginia's Public Education Network (Norfolk)
Distribution: usa
Date: Fri, 20 Nov 92 13:48:21 GMT

Old Dominion Universiy in Norfolk Virginia (12% minority, about
15,000 students, graduate level aand a few doctoral programs -
mainly oceanography) has a computer-course requirement.
However, there are no specific courses offered to fill this.
Most of the students end up taking Comp Sci 101 which is an
over-extended word processing course or the technology course
required for the teaching program.  The education majors have
to take a specific course which assumes that the student has
done some word processing.  Hope this helps

Loretta
lcardina@norfolk.vak12ed.edu
-- 
Newsgroups: comp.edu
From: pbrans@netxcom.netx.com (Pat Brans)
Newsgroups: comp.edu
Subject: US Degree Equivalents in France
Date: 20 Nov 92 23:26:13 GMT
Distribution: usa
Organization: NetExpress Inc., Vienna, VA, USA

I'm interested in knowing how my American BS in Computer 
Science and my American MS in Computer Science would translate
into the French system.  Does anyone know what the French
equivalents to these degrees are ?  

I believe that in France there is a degree called La Maitrise.
I think this requires about 4 years after high school.  Then
there are the DEA and the DESS which require 1 or two years
after the Maitrise.  Given this, I would think that my Masters
would correspond to the DEA or DESS.  But I don't think it's
as simple as that.

Is there any organization that has studied equivalencies between
the US and French higher education systems and that has them 
charted out ?

___
Pat Brans	| pbrans@netxcom.netx.com
Newsgroups: comp.edu,comp.theory,comp.arch,comp.programming
From: poynor@david.wheaton.edu (George V. Poynor)
Subject: Assessing library holdings
Organization: Wheaton College, IL
Date: Thu, 19 Nov 1992 16:13:06 GMT

We are trying to assess the adequacy of our library holdings in computer
science.  Does anyone know of guidelines concerning what books and 
journals would be desirable for a four-year college library, to support
a computer science major?  Thanks in advance.
--
George Poynor  ( poynor@david.wheaton.edu )
Computer Science Coordinator
Wheaton College
-- 
George V. Poynor
--
poynor@david.wheaton.edu
Xref: sparky comp.edu:1922 comp.org.acm:960 comp.programming:3198
From: nelson@desktop.nsc.com (Taed Nelson)
Newsgroups: comp.edu
Subject: Re: Plagiarism detection programs sought
Date: 19 Nov 92 17:28:15 GMT
Organization: Applications Technology, National Semiconductor (Santa Clara, CA)

It was our impression that the majority of programming assignment plagiarism
  took the simple form of simply changing variable names and
  adding/removing/changing comments.  Although someone who knew what the
  program should do would do a much better job, the people who just needed to
  get the assignment _done_ would, rather than work with someone on it, just
  ask a friend for their's (or in some cases steal it from someone's account)
  and make cosmetic changes.

The "nice" thing about this is that it would produce identical code.  The
  object files (ignoring the symbol table) would be identical.

Therefore, what we would do is ask the students to supply their source and
  executables on a disk (they assumed this was so we could run them ourselves,
  and sometimes we did do this), and then strip everyone's executables and
  write down the eventual size.

Then we would examine the code of any two programs that the size was identical
  or nearly the same.  Mind you that the classes had between 30 and 300 people
  in them, so the only way to look for cheating was to automate it...
Newsgroups: comp.edu
From: kenm@maccs.dcss.mcmaster.ca (...Jose)
Subject: CFP: Ontario Universities Computing Conference
Organization: Department of Computer Science, McMaster University
Distribution: ca
Date: Fri, 20 Nov 1992 20:35:55 GMT

-----------

Ontario Universities Computing Conference to be at McMaster

OUCC * OCUTINA * OCCCCD '93

The 24'th annual Ontario Universities Computing Conference (OUCC),  sponsored
by the Association of Computing Services Directors (ACSD), will be conjoined
with the ninth annual conference of the Ontario Colleges and Universities
Telecommunications and Information Network Association (OCUTINA) and, for the
first time, with the annual conference of the Ontario Community College
Computing Centre Directors (OCCCCD) at McMaster University, May 30 through
June 2, 1993.  This conjunction of groups is indicative of the ever-growing
cooperation between Colleges and  Universities, seeking cost-effective shared
solutions to common problems.

"Piecing It Together: People, Information and Technology", the theme for the
conference, emphasizes the spectrum of services required for the many
disparate groups within our organizations, the widely varied requirements for
access to information and the elusive promise that technology holds to give
both better service and more ready access. In spite of the dizzying progress
made by technology, its promise to both save money and appreciably improve
the work lives and educational experiences of faculty, staff and students has
not been satisfactorily realized.

Presentations will be welcomed from people involved in any aspect of
computing, networking or telecommunications in a post-secondary educational
setting - managers, support personnel, teachers, researchers, administrators,
and vendors. (Vendor presentations will be required to have a general
technology rather than a specific marketing focus.) 

Please direct any inquiries or submissions to the programme committee via:

   Phone:      (416) 525-9140 extension 4702

   FAX:        (416) 528-3773

   E-Mail:     oucc93@McMaster.CA

A copy of the complete Call For Papers is available upon request.  

-- 
-----------------------------------------------------------------------------
".sig quotes are silly"|Kenneth C. Moyle          kenm@maccs.dcss.mcmaster.ca 
 - Kenneth C. Moyle    |Department of Biochemistry     MOYLEK@MCMASTER.BITNET 
                       |McMaster University       ...!uunet!mnetor!maccs!kenm 
Newsgroups: comp.edu,aus.education
From: quigley@acs.ucalgary.ca (Martyn Thomas Quigley)
Subject: Re: Plagiarism detection programs sought
Date: Wed, 18 Nov 92 04:52:43 GMT
Organization: The University of Calgary, Alberta

michaelw@cs.su.oz.au (Michael Wise) writes:
>In a recent posting to comp.edu I advertised the availability of a system,
>called YAP, for performing automated detection of suspected plagiarism
>in student programming assignments. [.....]

Why is there so much interest in plagiarism in student programming
assignments?  Why don't you just set them different problems?

Mart
Newsgroups: comp.edu
From: dspencer@starbase.trincoll.edu (Dwight L. Spencer)
Subject: Math Ed for Americans
Organization: Trinity College, Hartford, CT.
Date: Mon, 23 Nov 1992 13:43:10 GMT

Just a note regarding the long series of postings about the inadequate
mathematical capabilities of American students in many fields - I can
confirm from my experience in teaching college again after a hiatus of 6 years
that the general situation, from my newest experiences, is worse than ever.

There's little point in relating details, but the current competency gap
of college freshmen in analytical/math reasoning is making my job in
teaching them the basics of computing almost a fruitless one ... the word
used by others - "frightening" - is completely appropriate.

- Dwight Spencer

  Visiting Assistant Professor
  Dept. of Engineering and Computer Science
  Trinity College
  Hartford, CT
From: e2csowensfsu@fre.fsu.umd.edu
Newsgroups: comp.edu
Subject: Need for Intro to CS course?
Date: 17 Nov 92 04:53:40 GMT
Reply-To: e2csowensfsu@fre.fsu.umd.edu
Organization: Frostburg State University, Frostburg, MD

Hello from Western Maryland;

I teach in the Computer Science Department of Frostburg State University, a
liberal arts school in the University of Maryland system. We are geographically
isolated from Maryland population centers and are the only 4 year state school
west of Baltimore (145 miles west).

Our 'bread and butter' course is Introduction to Computer Science, which is
mandatory for all freshmen. Due to severe fiscal problems in our state, ways are
being explored to slice budgets throughout the University system. Our Intro to
CS course is in jeopardy. If it goes, our department will suffer and likely
shrink, perhaps to the point of non-existence! We feel strongly that an
introductory computing course and a Computer Science department is vital for
today's college students for several reasons.

We have been given 2 weeks to mount a defense for continuing to offer a
mandatory Intro to CS course. It seems logical to pose this situation to the
network community. If you teach in a CS department, or just wish to share your
opinions with us about our situation, pro or con, please consider the following
questions and EMail your thoughts to us. (E2CSOWENSFSU@FRE.FSU.UMD.EDU). 


1. Should college freshmen be required to take an introductory computing course?
Why?

2. Does your school have an introductory CS course? Is it mandatory? What
school?
What is the course enrollment in a semester?

3. If your school has this course, what is its content? (intro to the science of
computing or intro to using computers)

3. Should this course be taught by a computer science department as a service
course or should it be available in any discipline customized for students
studying in that area?


I only subscribe to a few lists and I'm sure there are others I should post to.
If anyone reading this knows of another, more appropriate list for our query,
please forward this message or EMail the list address to me.

Thank you! 

Stephen Owens
Frostburg State University
E2CSOwens@fre.fsu.umd.edu
E2CSOwens@fre.towson.edu

Newsgroups: comp.edu
From: mazzucch@ghost.dsi.unimi.it (massimo mazzucchi)
Subject: dtp program
Organization: Computer Science Dep. - Milan University
Date: Wed, 18 Nov 1992 13:16:41 GMT


HI 

i am Max from Milan Italy

i will know if exist a PD program (not windows) or commercial

like publisher/page maker that:

- there aren't the difficultes to use it

- max 1 Mb di program

- and it can write A4 (21x29) ruotate (29x21) in which way 

 i can write on 2 page (15x21) but that left page must be

 an object and right page another object.

 ---------
 |        |                    ____________________
 |        |                    |        |         |
 |        |                    |        |         |
 |        |    --->            |        |         |
 |        |                    |        |         |
 |        |                    --------------------
 ----------
 Thanks for your help

 Bye


--------------------------------------------------------------------------------
!  Massimo Mazzucchi                         address    e-mail                !
!  University of State                       mazzucch@ghost.dsi.unimi.it      !
!  Departement of Computer Science            149.132.2.1                     ! 
!  Via Comelico, 41 -  20133 MILAN ITALY                                      !
 -------------------------------------------------------------------------------
Newsgroups: comp.edu.composition
From: dschenke@magnus.acs.ohio-state.edu (Dennis L Schenkel)
Subject: Re: (Fwd: *C&CD*) Syntax of imagery (10)
Organization: The Ohio State University
Distribution: na
Date: Mon, 23 Nov 1992 22:02:23 GMT

In article <1992Nov23.063038.1@ulkyvx.louisville.edu> r0mill01@ulkyvx.louisvill
e.edu writes:
>In a recent message
>>Date: Mon, 23 Nov 1992 02:11:57 -0200
>>From: "(Leland Emerson McCleary)" <mccleary@CAT.CCE.USP.BR>
>>Subject: Music and Imagery (*MBU*)
>>Message-id: <01GRGXOPLS2O8WW01Q@ulkyvx.bitnet>
>
>>How many would object to the statement that imagery has semantics
>>but no syntax.

I would say that it does.  Consider Catholic ritual.  It has a very specific sy
ntax designed to conjure very specific images.
-- 
Dennis Schenkel, Graduate Student    *****************************************
Ohio State University, English Dept  * Pax Christi Vobiscum...  from one of  *
dschenke@magnus.acs.ohio-state.edu   * those who "...wait in joyful hope..." *
    --My opinions are mine--         *****************************************
Newsgroups: comp.edu.composition